|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
511 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var bind = require('function-bind');
|
|---|
| 4 | var $TypeError = require('es-errors/type');
|
|---|
| 5 |
|
|---|
| 6 | var $call = require('./functionCall');
|
|---|
| 7 | var $actualApply = require('./actualApply');
|
|---|
| 8 |
|
|---|
| 9 | /** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|---|
| 10 | module.exports = function callBindBasic(args) {
|
|---|
| 11 | if (args.length < 1 || typeof args[0] !== 'function') {
|
|---|
| 12 | throw new $TypeError('a function is required');
|
|---|
| 13 | }
|
|---|
| 14 | return $actualApply(bind, $call, args);
|
|---|
| 15 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.