MCPcopy Create free account
hub / github.com/bigcommerce/stencil-cli / readStream

Function readStream

lib/utils/asyncUtils.js:21–32  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

19}
20
21function readStream(stream) {
22 return new Promise((resolve, reject) => {
23 let data = '';
24 stream.on('data', (chunk) => {
25 data += chunk;
26 });
27 stream.on('end', () => {
28 resolve(data);
29 });
30 stream.on('error', reject);
31 });
32}
33
34function tapStream(originalStream, onData) {
35 const tee = new PassThrough();

Callers 2

asyncUtils.spec.jsFile · 0.90
renderer.module.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected