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);
}