array-method-is-strict.js 329 B

12345678910
  1. 'use strict';
  2. var fails = require('../internals/fails');
  3. module.exports = function (METHOD_NAME, argument) {
  4. var method = [][METHOD_NAME];
  5. return !!method && fails(function () {
  6. // eslint-disable-next-line no-useless-call -- required for testing
  7. method.call(null, argument || function () { return 1; }, 1);
  8. });
  9. };