Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

range-inclusive

emilbayes5.6kISC1.0.2TypeScript support: definitely-typed

Generate a closed range of numbers [a, b] with step size d

range, inclusive, inclusive-range, d3.range, sequence, series, negative, step

readme

range-inclusive Build Status

Generate a closed range of numbers [a, b] with step size d

Installation

npm install range-inclusive

Usage

var rangeInclusive = require('range-inclusive')

rangeInclusive(10) // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
rangeInclusive(3, 9, 3) // [3, 6, 9]
rangeInclusive(7, 5, -1) // [7, 6, 5]

License

ISC