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

Function isHostObject

src/helpers/set.js:76–86  ·  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

74 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
75 */
76function isHostObject(value) {
77 // Many host objects are `Object` objects that can coerce to strings
78 // despite having improperly defined `toString` methods.
79 var result = false;
80 if (value != null && typeof value.toString != 'function') {
81 try {
82 result = !!(value + '');
83 } catch (e) {}
84 }
85 return result;
86}
87
88/** Used for built-in method references. */
89var 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…