summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/object-keys/isArguments.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/object-keys/isArguments.js')
-rw-r--r--deps/npm/node_modules/object-keys/isArguments.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/deps/npm/node_modules/object-keys/isArguments.js b/deps/npm/node_modules/object-keys/isArguments.js
new file mode 100644
index 0000000000..f2a2a9014d
--- /dev/null
+++ b/deps/npm/node_modules/object-keys/isArguments.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var toStr = Object.prototype.toString;
+
+module.exports = function isArguments(value) {
+ var str = toStr.call(value);
+ var isArgs = str === '[object Arguments]';
+ if (!isArgs) {
+ isArgs = str !== '[object Array]' &&
+ value !== null &&
+ typeof value === 'object' &&
+ typeof value.length === 'number' &&
+ value.length >= 0 &&
+ toStr.call(value.callee) === '[object Function]';
+ }
+ return isArgs;
+};