Generate all sorts of values based on a range of numbers, e.g:
const [...foo] = grange(3, 6); // [3,4,5,6]
This library requires a JavaScript engine with ES6 generator support. Works great with Node v6.
npm install --save grange
- Simple Range Function that should allow numbers to be input and an array returned.
- Test: Should return an array of numbers from start to end
- Test: Should return a range that ends with the last numbers
- Test: Should allow a range that starts with 0
- Test: Should allow a range of only 1 number
- Simple Range Generator Function that should allow numbers to be input and an array returned.
- Test: Should return an array of numbers from start to end
- Test: Should return a range that ends with the last numbers
- Test: Should allow a range that starts with 0
- Test: Should allow a range of only 1 number
- Range Generator should increment in provided steps
- Test: Should obey step increment argument
- Range Generator should allow for a transform function.
- Test: Should use transform function if provided.
Concept obtained from courses by Eric Elliott used for my own learning purposes