@kermanx/lazy-iterator
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

lazy-iterator

Yet another package for lazy iteration in JavaScript.

  • Full TypeScript support
  • No dependencies

Installation

npm install @kermanx/lazy-iterator

Usage

import { lazyIteratorFactory } from "@kermanx/lazy-iterator";

const iterator = lazyIteratorFactory.from([1, 2, 3]).map((x) => x * 2);

for (const x of iterator) {
  console.log(x);
}

You can extend the LazyIterator and LazyIteratorFactory class to create your own lazy iterators. See src/iterator.ts for details.

Readme

Keywords

Package Sidebar

Install

npm i @kermanx/lazy-iterator

Weekly Downloads

0

Version

1.0.1

License

Apache-2.0

Unpacked Size

102 kB

Total Files

64

Last publish

Collaborators

  • _kerman