Skip to content

Repository files navigation

@lucid-softworks/async-iterable-to-array

Materialize every value from a synchronous or asynchronous iterable into an array while preserving source order.

import { asyncIterableToArray } from "@lucid-softworks/async-iterable-to-array";

async function* values(): AsyncGenerator<number> {
  yield 1;
  yield 2;
  yield 3;
}

const array = await asyncIterableToArray(values());

About

Materialize sync or async iterable values into an array.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages