Add Object.isObject shim
This commit is contained in:
parent
2cf47dba1d
commit
d7cb85131d
1 changed files with 9 additions and 0 deletions
9
lib/utils/prototypes.js
vendored
9
lib/utils/prototypes.js
vendored
|
@ -52,3 +52,12 @@ Object.defineProperty(Array.prototype, 'map', function (fn, array) {
|
||||||
})
|
})
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Object.defineProperty(Object, 'isObject', {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: false,
|
||||||
|
writable: true,
|
||||||
|
value: function (obj) {
|
||||||
|
return ((!!obj) && (obj.constructor === Object))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in a new issue