npm.io
1.0.6 • Published 6 years ago

@sovpro/split-num

Licence
MIT
Version
1.0.6
Deps
0
Size
4 kB
Vulns
0
Weekly
0

Split Number

Split an integer number into an array or iterable value of single-digit numbers.

Build status for Node.js 4.x and newer

Split into an array

let split_num = splitNum (123)

Split into an iterable value

let split_iterable = splitNum.lazy (123)
for (let digit of split_iterable) {
  // ... do stuff with digit
}

Keywords