Skip to content

korkje/range

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

range JSR

Python's range function in JS/TS.

import range from "jsr:@korkje/range";

console.log([...range(5)]); // [0, 1, 2, 3, 4]
console.log([...range(1, 5)]); // [1, 2, 3, 4]
console.log([...range(1, 10, 2)]); // [1, 3, 5, 7, 9]
console.log([...range(10, 1, -2)]); // [10, 8, 6, 4, 2]

About

Python 'range' in JS

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors