Add Object.isObject shim

This commit is contained in:
pyoor 2017-06-08 17:56:46 -04:00
parent 2cf47dba1d
commit d7cb85131d
1 changed files with 9 additions and 0 deletions

View File

@ -52,3 +52,12 @@ Object.defineProperty(Array.prototype, 'map', function (fn, array) {
})
return result
})
Object.defineProperty(Object, 'isObject', {
configurable: true,
enumerable: false,
writable: true,
value: function (obj) {
return ((!!obj) && (obj.constructor === Object))
}
})