to-object-x
ES6-compliant shim for ToObject.
See: 7.1.13 ToObject ( argument )
Version: 1.5.0
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750
module.exports(value)
⇒ Object
⏏
The abstract operation ToObject converts argument to a value of
type Object.
Kind: Exported function
Returns: Object
- The value
converted to an object.
Throws:
TypeError
If value
is a null
or undefined
.
Param | Type | Description |
---|
value | * | The value to convert. |
Example
var ToObject = require('to-object-x');
ToObject();
ToObject(null);
ToObject('abc');
ToObject(true);
ToObject(Symbol('foo'));