Module: jsdoc/util/cast

Module to convert values between various JavaScript types.
Source:

Members

number

Source:

number

Source:

result

Source:

result

Source:

result

Source:

result

Source:

result

Source:

result

Source:

result

Source:

result

Source:

result

Source:

result

Source:

result

Source:

Methods

cast(item) → {string|number|boolean|Object|Array}

Check whether a string contains a boolean or numeric value, and convert the string to the appropriate type if necessary. If an object or array is passed to this method, the object or array's values will be recursively converted to the appropriate types. The original object or array is not modified.
Parameters:
Name Type Description
item string | Object | Array The item whose type will be converted.
Source:
Returns:
The converted value.
Type
string | number | boolean | Object | Array

castString(str) → {string|number|boolean}

Check whether a string contains a boolean or numeric value, and convert the string to the appropriate type if necessary.
Parameters:
Name Type Description
str string The string to convert.
Source:
Returns:
The converted value.
Type
string | number | boolean