@esfx/async-iter-ordered-fromsync Package
An API to convert an OrderedIterable<T> into an AsyncOrderedIterable<T>.
Installation
npm i @esfx/async-iter-ordered-fromsync
Usage
import { toAsyncOrderedIterable } from "@esfx/async-iter-ordered-fromsync";
import { AsyncOrderedIterable } from "@esfx/async-iter-ordered";
import { OrderedIterable } from "@esfx/iter-ordered";
async function f<T>(source: AsyncOrderedIterable<T> | OrderedIterable<T | PromiseLike<T>>) {
const asyncIterable = toAsyncOrderedIterable(source);
// ...
}
Functions
toAsyncOrderedIterable(iterable)
Declaration
export declare function toAsyncOrderedIterable<T>(iterable: AsyncOrderedIterable<T> | OrderedIterable<T>): AsyncOrderedIterable<T>;
Type Parameters
- T
Parameters
- iterable
- AsyncOrderedIterable<T> | OrderedIterable<T>