source: imaps-frontend/node_modules/es-abstract/2016/Call.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 605 bytes
Line 
1'use strict';
2
3var GetIntrinsic = require('get-intrinsic');
4var callBound = require('call-bound');
5
6var $TypeError = require('es-errors/type');
7
8var IsArray = require('./IsArray');
9
10var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
11
12// https://262.ecma-international.org/6.0/#sec-call
13
14module.exports = function Call(F, V) {
15 var argumentsList = arguments.length > 2 ? arguments[2] : [];
16 if (!IsArray(argumentsList)) {
17 throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
18 }
19 return $apply(F, V, argumentsList);
20};
Note: See TracBrowser for help on using the repository browser.