You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

range-gen

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

range-gen

Python-like xrange generator function

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

Range-Gen

An es6 generator for a python-like, low overhead number range iterator.

Usage

import range from "range-gen";
for (var i of range(3)) {
	console.log(i);
}
// Prints 0 1 2
for (var i of range(3, 6)) {
	console.log(i);
}
// Prints 3 4 5
for (var i of range(6, 9, 2)) {
	console.log(i);
}
// Prints 6 8
for (var i of range(0, -2, -1) {
	console.log(i);
}
// Prints 0 -1

Keywords

range

FAQs

Package last updated on 18 May 2015

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