New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

step-generator

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

step-generator

Generate a sequence of numbers


Version published
Maintainers
1
Created

step-generator

Generate a sequence of numbers

Build Status

Installation

npm install --save step-generator or yarn add step-generator

Test

npm test or yarn test

Usage

Generate a sequence of stepping numbers.

const stepGenerator = require('step-generator')

const evenGenerator = stepGenerator(2, 2)

const evens = [
    evenGenerator.next().value,
    evenGenerator.next().value,
    evenGenerator.next().value,
    evenGenerator.next().value,
]

console.log(evens)

Output

[2, 4, 6, 8]

FAQs

Package last updated on 18 Jan 2018

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