web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
623 B

  1. 'use strict';
  2. var GetIntrinsic = require('get-intrinsic');
  3. var callBound = require('call-bind/callBound');
  4. var $TypeError = GetIntrinsic('%TypeError%');
  5. var IsArray = require('./IsArray');
  6. var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('%Function.prototype.apply%');
  7. // https://ecma-international.org/ecma-262/6.0/#sec-call
  8. module.exports = function Call(F, V) {
  9. var argumentsList = arguments.length > 2 ? arguments[2] : [];
  10. if (!IsArray(argumentsList)) {
  11. throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
  12. }
  13. return $apply(F, V, argumentsList);
  14. };