Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

lxsmnsyc/endless.js

Repository files navigation

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

Releases

No releases published

Sponsor this project

 

Packages

No packages published