esnext.number.range.js 416 B

123456789101112
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var NumericRangeIterator = require('../internals/numeric-range-iterator');
  4. // `Number.range` method
  5. // https://github.com/tc39/proposal-Number.range
  6. // TODO: Remove from `core-js@4`
  7. $({ target: 'Number', stat: true, forced: true }, {
  8. range: function range(start, end, option) {
  9. return new NumericRangeIterator(start, end, option, 'number', 0, 1);
  10. }
  11. });