MCPcopy Create free account
hub / github.com/Lemoncode/fonk / isHostObject

Function isHostObject

src/helpers/get.js:72–82  ·  view source on GitHub ↗

* Checks if `value` is a host object in IE < 9. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.

(value)

Source from the content-addressed store, hash-verified

70 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
71 */
72function isHostObject(value) {
73 // Many host objects are `Object` objects that can coerce to strings
74 // despite having improperly defined `toString` methods.
75 let result = false;
76 if (value != null && typeof value.toString != 'function') {
77 try {
78 result = !!(value + '');
79 } catch (e) {}
80 }
81 return result;
82}
83
84/** Used for built-in method references. */
85const arrayProto = Array.prototype,

Callers 1

baseIsNativeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…