Node-Red configuration
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.

es.reflect.apply.js 775B

1234567891011121314151617181920
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var functionApply = require('../internals/function-apply');
  4. var aCallable = require('../internals/a-callable');
  5. var anObject = require('../internals/an-object');
  6. var fails = require('../internals/fails');
  7. // MS Edge argumentsList argument is optional
  8. var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
  9. // eslint-disable-next-line es/no-reflect -- required for testing
  10. Reflect.apply(function () { /* empty */ });
  11. });
  12. // `Reflect.apply` method
  13. // https://tc39.es/ecma262/#sec-reflect.apply
  14. $({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
  15. apply: function apply(target, thisArgument, argumentsList) {
  16. return functionApply(aCallable(target), thisArgument, anObject(argumentsList));
  17. }
  18. });