1.0.0 • Published 7 years ago

numit v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

numit

Just an iterator for numbers to generate arrays.

Installation

npm

npm i numit

Usage

require("numit"); // First require it

// examples
[...10] // => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[...-10] // => [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]
[...0] // => []
[...Infinity] // throws exception (e.g. must be safe integer)

// low-level
Number.range(10); // => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Testing

For testing first install all dependencies

npm install

Test command:

npm run test