@vangware/iterables

Vangware's Iterables logo

Build Status Coverage License NPM Version Open Issues

🔁 Iterable and AsyncIterable utils.

Usage

This package can be installed as a dependency or used directly.

Usage as ECMAScript module

🦕 In JS or deno:

import { map } from "https://esm.sh/@vangware/iterables";

const mapDouble = map((value: number) => value * 2);

[...mapDouble([1, 2, 3])]; // [2, 4, 6]

🌎 Or in the browser:

<script type="module">
import { map } from "https://esm.sh/@vangware/iterables";

const mapDouble = map((value: number) => value * 2);

[...mapDouble([1, 2, 3])]; // [2, 4, 6]
</script>

Usage with local installation

First:

# If you use npm
npm install @vangware/iterables
# If you use pnpm
pnpm add @vangware/iterables
# If you use yarn
yarn add @vangware/iterables

And then:

import { map } from "@vangware/iterables";

const mapDouble = map((value: number) => value * 2);

[...mapDouble([1, 2, 3])]; // [2, 4, 6]

Documentation

Documentation is available HERE. It is auto-generated with typedoc based on the JSDocs and the types in the source. It shouldn't be necessary to read this. Code editors like VS Code integrate the documentation in the UI.

Changelog

Changelog can be found HERE.

Test coverage

Test coverage can be found HERE.