rangz
0.0.3 • Public • Published Rangz
How do I get started?
npm i rangz --save
const range = require("rangz");
How do I make a range?
But how do I iterate over it?
for(const i of range(30))
What about start points, end points and steps?
range({
start: 5,
end: 30,
step: 2
});
But I don't want the step to just add a number, I want it to multiply by 2.
range({
start: 1,
end: 1000,
step: i => i * 2
});
But my range needs to be INFINITE.
Great, but how do I get a slice of my infinite range?
Awesome, but my range is descending, not ascending.
Cool, but what if my range is exponential?
Impressive, but my range is descending AND exponential.
Great, but I want the millionth value of the range, and I don't need the whole array.
range(1, 2).get(1000000);
Package Sidebar
Install
Weekly Downloads