Socket
Book a DemoInstallSign in
Socket

@iterables/count

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iterables/count

Return an infinite iterator counting forward from a number at a defined step.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

@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 40

Installation

$ npm install --save @iterables/count

API

count(from = 0, step = 1) -> Iterator<Number>

  • from: A number at which to begin the iterator. Defaults to 0.
  • step: A number to advance the iterator. Defaults to 1.

License

MIT

FAQs

Package last updated on 08 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts