robiXxu / range

Javascript version of Python range

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

range

Javascript version of Python range

Install

npm install @robixxu/range
Add to your project
const range = require('@robixxu/range');
import range from '@robixxu/range';

Usage

range(stop)
range(start, stop, [step])

Examples

range(5)      // [0,1,2,3,4]
range(1,5)    // [1,2,3,4]
range(0)      // []
range(-5,0)   // [-5, -4, -3, -2, -1]
range(1,5,2)  // [1,3]

Support

If you find any problems feel free to tweet @robiXxu, email at schiriac.robert@gmail.com or open a issue on Github.

MIT License

About

Javascript version of Python range

License:MIT License


Languages

Language:JavaScript 100.0%