rangey
Python 3.x
range
for ES6
Installation | Usage | Example | License
Installation
With npm:
npm install rangey --save
Note: You need an engine that supports ES6 (e.g. Babel or Node 4.0+).
Usage
rangey.range([start, ]stop[, step])
Starts a loop on start
, incrementing by step
until reaching stop
.
This is a generator function that yields values one by one (and does not take up memory for an array)
Defaults:
start
= 0step
= 1
rangey.listOf(generator)
Appends all values from generator into an array.
Example
'use strict' for let i of // 0, 1, 2, 3 // 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5