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

Function readFromStream

lib/utils/asyncUtils.js:13–19  ·  view source on GitHub ↗

* WARNING! Can be used with text content only. Binary data (e.g. images) will get broken! * * @param {ReadableStream} stream * @returns {Promise }

(stream)

Source from the content-addressed store, hash-verified

11 * @returns {Promise<string>}
12 */
13async function readFromStream(stream) {
14 let result = '';
15 for await (const chunk of stream) {
16 result += chunk;
17 }
18 return result;
19}
20
21function readStream(stream) {
22 return new Promise((resolve, reject) => {

Callers 2

renderer.module.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected