Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es-abstract/helpers/OwnPropertyKeys.js')
-rw-r--r--node_modules/es-abstract/helpers/OwnPropertyKeys.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/node_modules/es-abstract/helpers/OwnPropertyKeys.js b/node_modules/es-abstract/helpers/OwnPropertyKeys.js
new file mode 100644
index 000000000..4a06ce344
--- /dev/null
+++ b/node_modules/es-abstract/helpers/OwnPropertyKeys.js
@@ -0,0 +1,22 @@
+'use strict';
+
+var GetIntrinsic = require('../GetIntrinsic');
+
+var callBind = require('./callBind');
+var callBound = require('./callBound');
+
+var $ownKeys = GetIntrinsic('%Reflect.ownKeys%', true);
+var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%'));
+var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
+var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
+var $gOPS = $SymbolValueOf ? GetIntrinsic('%Object.getOwnPropertySymbols%') : null;
+
+var keys = require('object-keys');
+
+module.exports = $ownKeys || function OwnPropertyKeys(source) {
+ var ownKeys = ($gOPN || keys)(source);
+ if ($gOPS) {
+ $pushApply(ownKeys, $gOPS(source));
+ }
+ return ownKeys;
+};