1.0.2 • Published 9 years ago
@iterables/count v1.0.2
@iterables/count
Return an infinite iterator counting forward from a number at a defined step.
const count = require('@iterables/count')
const [one, two] = count(10)
console.log(one, two) // 10 11
const [un, deux, trois] = count(0, 20)
console.log(un, deux, trois) // 0 20 40Installation
$ npm install --save @iterables/countAPI
count(from = 0, step = 1) -> Iterator<Number>
from: A number at which to begin the iterator. Defaults to0.step: A number to advance the iterator. Defaults to1.
License
MIT