Skip to main content
Deno 2 is finally here 🎉️
Learn more

Test changes licence npm version npm size

xrange

Python-esque iterator for number ranges

xrange is a function based on Python 3’s range class (or Python 2’s xrange class). Like the one in Python, xrange creates virtual arrays (see Iterators) which allows getting values lazily. This prevents over-the-top memory consumption when using large numbers, and opens the possibility to create never-ending, infinite lists.

Created with create-package-typescript

Examples:

See /docs/examples at GitHub to see xrange usage, including errors and advanced usage.