most-range
Creates a most.js stream of numbers (positive and/or negative) progressing from start up, or down, to, but not including, end.
Installation
Using npm:
$ npm install --save most-range
In Node.js:
const range = ;
Usage
range(start, end [, step = 1 or -1]) -> Stream
range(0, 10, 2): -0-2-4-6-8-|
start
is the start of the range.end
is the end of the range, its value is excluded.step
is the value to increment or decrement by, the default is 1 ifend
is greater thanstart
, -1 otherwise.
Example
const range = ; // Logs// 10// 7// 4// 1