MCPcopy Create free account
hub / github.com/sindresorhus/execa / arrayFromAsync

Function arrayFromAsync

test/helpers/convert.js:8–14  ·  view source on GitHub ↗
(asyncIterable, lines = [])

Source from the content-addressed store, hash-verified

6import {foobarString} from './input.js';
7
8export const arrayFromAsync = async (asyncIterable, lines = []) => {
9 for await (const line of asyncIterable) {
10 lines.push(line);
11 }
12
13 return lines;
14};
15
16export const finishedStream = stream => finished(stream, {cleanup: true});
17

Callers 4

testSuccessFunction · 0.90
iterable.jsFile · 0.90
assertMultipleCallsFunction · 0.90
assertIterableChunksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected