🔁 Iterable and AsyncIterable utils.
This package can be installed as a dependency or used directly.
🦕 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>
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 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 can be found HERE.
Test coverage can be found HERE.