🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

create-range

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-range

Create an array of integers from any to any

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

Create range

Creates an array of integers from start up to end. Always returns an array. Never throws any errors.

Installation

npm i --save create-range

Usage

Create an array of integers:

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

const minusPlusFifty = createRange(-50, 50);
// [-50, -49, ... , 49, 50]

const x = createRange(-Infinity, undefined);
// []

Keywords

range

FAQs

Package last updated on 08 Aug 2017

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