MCPcopy
hub / github.com/rollup/rollup / readStdin

Function readStdin

cli/run/stdin.ts:25–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25function readStdin(): Promise<string> {
26 return new Promise((resolve, reject) => {
27 const chunks: Buffer[] = [];
28 process.stdin.setEncoding('utf8');
29 process.stdin
30 .on('data', chunk => chunks.push(chunk))
31 .on('end', () => {
32 const result = chunks.join('');
33 resolve(result);
34 })
35 .on('error', error => {
36 reject(error);
37 });
38 });
39}

Callers 1

loadFunction · 0.85

Calls 4

rejectFunction · 0.85
pushMethod · 0.80
onMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…