Skip to content

About

Lazily transform sync or async iterable values with backpressure.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

@lucid-softworks/async-iterable-map

Lazily transform synchronous or asynchronous iterable sources. Async transforms are awaited sequentially to preserve source order and backpressure.

import { mapAsyncIterable } from "@lucid-softworks/async-iterable-map";

const ids = ["user-1", "user-2"];
const fetchUser = async (id: string) => ({ id, name: "Ada" });

for await (const user of mapAsyncIterable(ids, fetchUser)) {
  console.log(user.name);
}

About

Lazily transform sync or async iterable values with backpressure.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages