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

Function tapStream

lib/utils/asyncUtils.js:34–47  ·  view source on GitHub ↗
(originalStream, onData)

Source from the content-addressed store, hash-verified

32}
33
34function tapStream(originalStream, onData) {
35 const tee = new PassThrough();
36 originalStream.pipe(tee);
37
38 let data = '';
39 tee.on('data', (chunk) => {
40 data += chunk;
41 });
42 tee.on('end', () => {
43 onData(data);
44 });
45
46 return tee; // Use this stream for downstream consumers
47}
48
49export { readFromStream, tapStream, readStream };
50export default {

Callers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected