npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

range-of-numbers

1.1.6 • Public • Published

range-of-numbers

A little module to generate an Array of integer values from <startIndex> to <endIndex> inclusive. With optional non-negative <step> amount. Also implemented using a promise for use with large arrays(maybe). Work in progress: changes frequently! works with node v.9.5.0

Install

npm install range-of-numbers

Usage

const { range, rangePromise } = require('range-of-numbers')
 
rangePromise(0, 10000000).then(list => list.length).then(console.log) // 100000001
range(-5, 5, 2)     // [-5,-3,-1,1,3,5]
range(10, 18, 3)    // [10,13,16]
range(5)            // [0,1,2,3,4,5]
range(10, 100, 10)  // [10,20,30,40,50,60,70,80,90,100]

License

MIT, see LICENSE.md for details.

install

npm i range-of-numbers

Downloadsweekly downloads

1

version

1.1.6

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability