range-of-numbers
A little module to generate an Array of integer values.
Last updated 2 years ago by endziu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install range-of-numbers 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.1.6                                ...           latest (2 years ago)

11 Versions

  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 6
Last Day 0
Last Week 1
Last Month 5
Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |