collect
@twine-protocol/twine-core v0.1.0 • Docs
twine-js / @twine-protocol/twine-core / collect
Function: collect()
collect<
T>(iterable):Promise<T[]>
Collect an async iterable into an array
Type Parameters
Type Parameter
T
Parameters
Parameter
Type
Description
iterable
AsyncIterable<T, any, any>
The async iterable to collect
Returns
Promise<T[]>
Example
import { collect } from '@twine-protocol/twine-core'
const chains = await collect(resolver.chains())Defined in
Last updated