npm.io
1.0.0 • Published 6 years ago

pickaround

Licence
ISC
Version
1.0.0
Deps
0
Size
6 kB
Vulns
0
Weekly
0
Stars
2

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];

Licence

MIT