Methods
toMath(name)
Parameters:
- Implements:
- Source:
Example
'1'.toMath('abs'); // 1
'-1'.toMath('abs'); // 1
'-0.1'.toMath('abs'); // 0.1
xParse(typeopt) → {AnyItem}
This:
Parameters:
Name |
Type |
Attributes |
Default |
Description |
type |
external:String
|
<optional>
|
"json"
|
data format |
- Implements:
- Source:
Returns:
-
Type
-
AnyItem
Example
// Array
'["a"]'.xParse(); // ['a']
// Boolean
'true'.xParse(); // true
// Date
'"2015-07-13T00:00:00.000Z"'.xParse(); // Date()
// Number
'1.5'.xParse(); // 1.5
// Object
'{"a":"A"}'.xParse(); // { a: 'A' }
// String
'"a"'.xParse(); // 'a'
'"b\\"c"'.xParse(); // 'b"c'
This:
Parameters:
Name |
Type |
Attributes |
Default |
Description |
type |
external:String
|
<optional>
|
"json"
|
data format |
- Implements:
- Source:
Returns:
-
Type
-
external:String
Example
'a'.xTo(); // '"a"'
'b"c'.xTo(); // '"b\\"c"'