number-array-from-range
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

number-array-from-range

Creates an array of numbers for a given range.

GitHub release Travis tests codecov Codacy Badge

Install

You can install via npm or yarn.

npm

npm install --save number-array-from-range

yarn

yarn add number-array-from-range

Usage

Importing

You can import using ES6 imports.

import { numberArrayFromRange } from 'number-array-from-range';

Arguments

numberArrayFromRange accepts two arguments:

min: The lower bound of the number array to create

max The upper bound of the number array to create

Example

import { numberArrayFromRange } from 'number-array-from-range';

const rangeArray = numberArrayFromRange(10, 20);
// [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]

/number-array-from-range/

    Package Sidebar

    Install

    npm i number-array-from-range

    Weekly Downloads

    1,105

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    152 kB

    Total Files

    9

    Last publish

    Collaborators

    • bameyrick