es.array.from.js 518 B

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