summaryrefslogtreecommitdiff
path: root/src/node_modules/es-abstract/2015/Call.js
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);
};