aboutsummaryrefslogtreecommitdiff
path: root/node_modules/core-js/stable/instance/keys.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/core-js/stable/instance/keys.js')
-rw-r--r--node_modules/core-js/stable/instance/keys.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/core-js/stable/instance/keys.js b/node_modules/core-js/stable/instance/keys.js
new file mode 100644
index 0000000..b83acb7
--- /dev/null
+++ b/node_modules/core-js/stable/instance/keys.js
@@ -0,0 +1,16 @@
+require('../../modules/web.dom-collections.iterator');
+var keys = require('../array/virtual/keys');
+var classof = require('../../internals/classof');
+var ArrayPrototype = Array.prototype;
+
+var DOMIterables = {
+ DOMTokenList: true,
+ NodeList: true
+};
+
+module.exports = function (it) {
+ var own = it.keys;
+ return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.keys)
+ // eslint-disable-next-line no-prototype-builtins
+ || DOMIterables.hasOwnProperty(classof(it)) ? keys : own;
+};