es.array.from.js 506 B

1234567891011121314
  1. var $ = require('../internals/export');
  2. var from = require('../internals/array-from');
  3. var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');
  4. var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  5. // eslint-disable-next-line es-x/no-array-from -- required for testing
  6. Array.from(iterable);
  7. });
  8. // `Array.from` method
  9. // https://tc39.es/ecma262/#sec-array.from
  10. $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  11. from: from
  12. });