Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Call.js « 2018 « es-abstract « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f0f0451741fb0feb0091a223f92ef650bf3b1552 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
'use strict';

var GetIntrinsic = require('../GetIntrinsic');
var callBound = require('../helpers/callBound');

var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('%Function.prototype.apply%');

// https://www.ecma-international.org/ecma-262/6.0/#sec-call

module.exports = function Call(F, V) {
	var args = arguments.length > 2 ? arguments[2] : [];
	return $apply(F, V, args);
};