require-object-coercible-x
ES6-compliant shim for RequireObjectCoercible.
See: 7.2.1 RequireObjectCoercible ( argument )
module.exports(value)
⇒ string
⏏
The abstract operation RequireObjectCoercible throws an error if argument is a value that cannot be converted to an Object using ToObject.
Kind: Exported function
Returns: string
- The value
.
Throws:
TypeError
Ifvalue
is anull
orundefined
.
Param | Type | Description |
---|---|---|
value | * |
The value to check. |
Example
; ; // TypeError; // TypeErrorconsole; // 'abc'console; // trueconsole; // Symbol('foo')