MCPcopy Create free account
hub / github.com/nodejs/node / collectStream

Function collectStream

test/parallel/test-cli-node-options.js:135–142  ·  view source on GitHub ↗
(readable)

Source from the content-addressed store, hash-verified

133}
134
135async function collectStream(readable) {
136 readable.setEncoding('utf8');
137 let data = '';
138 for await (const chunk of readable) {
139 data += chunk;
140 }
141 return data;
142}
143
144function workerTest(opts, command, wantsError, test) {
145 let workerError = null;

Callers 1

workerTestFunction · 0.85

Calls 1

setEncodingMethod · 0.45

Tested by

no test coverage detected