Variable: concatAsync()
constconcatAsync: <Value>(...iterables) =>AsyncIterable<Value>
Defined in: splices.d.ts:1343
Returns an async iterable that contains the values of each iterable in
iterables in iteration order.
Like Array.prototype.concat, but for async iterables.
Type Parameters
Value
Value
Parameters
iterables
...readonly (Iterable<Value> | AsyncIterable<Value>)[]
Returns
AsyncIterable<Value>
Example
console.log(
await pipe(
concatAsync(asAsync([1, 2]), [3, `sloth`, 5], asAsync([6, 7])),
reduceAsync(toArray()),
),
)
//=> [ 1, 2, 3, 'sloth', 5, 6, 7 ]
Since
v0.0.2