diff options
Diffstat (limited to 'tools/node_modules/eslint/node_modules/is-plain-obj/index.js')
-rw-r--r-- | tools/node_modules/eslint/node_modules/is-plain-obj/index.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/node_modules/is-plain-obj/index.js b/tools/node_modules/eslint/node_modules/is-plain-obj/index.js new file mode 100644 index 0000000000..0d1ba9eeb8 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/is-plain-obj/index.js @@ -0,0 +1,7 @@ +'use strict'; +var toString = Object.prototype.toString; + +module.exports = function (x) { + var prototype; + return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); +}; |