pickaround
v1.0.0
Published
A tiny utility to pick numbers around a given number, based on a given range.
Downloads
91
Readme
pickaround(num, range)
A tiny utility to pick numbers around a given number, based on a given range.
Usage
pickaround(number, range, [negative])
pickAround(8, 5) === [6, 7, 8, 9, 10];
pickAround(1, 5) === [-1, 0, 1, 2, 3];
pickAround(1, 5, false) === [0, 1, 2, 3];