From d7cb85131d66aa8dc5323c2968439c990e00c844 Mon Sep 17 00:00:00 2001 From: pyoor Date: Thu, 8 Jun 2017 17:56:46 -0400 Subject: [PATCH] Add Object.isObject shim --- lib/utils/prototypes.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/utils/prototypes.js b/lib/utils/prototypes.js index aba2952..af3cacb 100644 --- a/lib/utils/prototypes.js +++ b/lib/utils/prototypes.js @@ -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)) + } +})