npm.io
1.0.0 • Published 3 years ago

@esfx/async-iter-fromsync

Licence
Apache-2.0
Version
1.0.0
Deps
0
Size
23 kB
Vulns
0
Weekly
0
Stars
233

@esfx/async-iter-fromsync

An API to convert an ECMAScript Iterable into an AsyncIterable.

Overview

Installation

npm i @esfx/async-iter-fromsync

Usage

import { toAsyncIterable } from "@esfx/async-iter-fromsync";

async function f<T>(source: AsyncIterable<T> | Iterable<T | PromiseLike<T>>) {
    const asyncIterable = toAsyncIterable(source);
    ...
}

API

You can read more about the API here.