to-string-x
ES6-compliant shim for ToString.
See: 7.1.12 ToString ( argument )
module.exports(value)
⇒ string
⏏
The abstract operation ToString converts argument to a value of type String.
Kind: Exported function
Returns: string
- The converted value.
Throws:
TypeError
Ifvalue
is a Symbol.
Param | Type | Description |
---|---|---|
value | * |
The value to convert to a string. |
Example
; console; // 'undefined'console; // 'null'console; // 'abc'console; // 'true'console; // TypeErrorconsole; // TypeErrorconsole; // TypeErrorconsole; // TypeError