From 7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 28 May 2017 00:38:50 +0200 Subject: add linting (and some initial fixes) --- node_modules/deep-equal/lib/is_arguments.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 node_modules/deep-equal/lib/is_arguments.js (limited to 'node_modules/deep-equal/lib/is_arguments.js') diff --git a/node_modules/deep-equal/lib/is_arguments.js b/node_modules/deep-equal/lib/is_arguments.js new file mode 100644 index 000000000..1ff150fce --- /dev/null +++ b/node_modules/deep-equal/lib/is_arguments.js @@ -0,0 +1,20 @@ +var supportsArgumentsClass = (function(){ + return Object.prototype.toString.call(arguments) +})() == '[object Arguments]'; + +exports = module.exports = supportsArgumentsClass ? supported : unsupported; + +exports.supported = supported; +function supported(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +}; + +exports.unsupported = unsupported; +function unsupported(object){ + return object && + typeof object == 'object' && + typeof object.length == 'number' && + Object.prototype.hasOwnProperty.call(object, 'callee') && + !Object.prototype.propertyIsEnumerable.call(object, 'callee') || + false; +}; -- cgit v1.2.3