aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/call-bind-apply-helpers/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/call-bind-apply-helpers/index.js')
-rw-r--r--node_modules/call-bind-apply-helpers/index.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/call-bind-apply-helpers/index.js b/node_modules/call-bind-apply-helpers/index.js
new file mode 100644
index 0000000..2f6dab4
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/index.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var bind = require('function-bind');
+var $TypeError = require('es-errors/type');
+
+var $call = require('./functionCall');
+var $actualApply = require('./actualApply');
+
+/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
+module.exports = function callBindBasic(args) {
+ if (args.length < 1 || typeof args[0] !== 'function') {
+ throw new $TypeError('a function is required');
+ }
+ return $actualApply(bind, $call, args);
+};