integer-sequence
v0.0.4
Published
A package providing integer sequence object wrapping the range from Number.MIN_SAFE_INTEGER to Number.MAX_SAFE_INTEGER
Downloads
2
Readme
Integer Sequence
A package providing integer sequence object wrapping the range from
Number.MIN_SAFE_INTEGER
to Number.MAX_SAFE_INTEGER
.
Usage
var IntegerSequence = require('integer-sequence');
var seq = new IntegerSequence(5);
seq.next(); // => 6
seq.next(); // => 7
seq.prev(7); // => 0
seq.next(Number.MAX_SAFE_INTEGER); // => 9007199254740991
seq.next(); // => -9007199254740991
License
Creative Commons Zero 1.0 Universal (CC0).