completed exercise 3.1
This commit is contained in:
parent
68aa0e9905
commit
0bd43956c9
604 changed files with 67855 additions and 0 deletions
15
parts/3/phonebookBackend/node_modules/call-bind-apply-helpers/index.js
generated
vendored
Normal file
15
parts/3/phonebookBackend/node_modules/call-bind-apply-helpers/index.js
generated
vendored
Normal file
|
|
@ -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);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue