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/callBind.js')
-rw-r--r--node_modules/es-abstract/helpers/callBind.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/es-abstract/helpers/callBind.js b/node_modules/es-abstract/helpers/callBind.js
new file mode 100644
index 000000000..81b02ec93
--- /dev/null
+++ b/node_modules/es-abstract/helpers/callBind.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var bind = require('function-bind');
+
+var GetIntrinsic = require('../GetIntrinsic');
+
+var $apply = GetIntrinsic('%Function.prototype.apply%');
+var $call = GetIntrinsic('%Function.prototype.call%');
+var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
+
+module.exports = function callBind() {
+ return $reflectApply(bind, $call, arguments);
+};
+
+module.exports.apply = function applyBind() {
+ return $reflectApply(bind, $apply, arguments);
+};