UNPKG

453 BJavaScriptView Raw
1'use strict';
2var $ = require('../internals/export');
3var RangeIterator = require('../internals/range-iterator');
4
5// `BigInt.range` method
6// https://github.com/tc39/proposal-Number.range
7if (typeof BigInt == 'function') {
8 $({ target: 'BigInt', stat: true }, {
9 range: function range(start, end, option) {
10 // eslint-disable-next-line no-undef
11 return new RangeIterator(start, end, option, 'bigint', BigInt(0), BigInt(1));
12 }
13 });
14}