endless-js

0.2.0 • Public • Published

endless.js

Infinite List in JS similar to Haskell's InfList

NPM

HitCount

Platform Build Status
Linux Build Status
Windows Build status

codecov

Known Vulnerabilities devDependencies Status

Install

NPM

npm i endless-js

CDN

<script style="https://cdn.jsdelivr.net/npm/endless-js/dist/index.min.js"></script>

Usage

Endless behaves similarly to a normal Array instance. The only difference is that Endless can only be constructed given a function that produces values.

const example = new Endless(x => x); // [0, 1, 2, 3, 4, 5, ...]

You can set/get through brackets notation:

example[0] = 100;
example[0]; // 100

Documentation

Inline docs

Online documentation available at the Official endless.js docs site

Build

Clone the repo first, then run:

npm install

To build:

npm run build

Package Sidebar

Install

npm i endless-js

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

38.4 kB

Total Files

6

Last publish

Collaborators

  • lxsmnsyc