MCPcopy Index your code
hub / github.com/formatjs/formatjs / getStdinAsString

Function getStdinAsString

packages/cli-lib/console_utils.ts:64–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62}
63
64export function getStdinAsString(): Promise<string> {
65 let result = ''
66 return new Promise(resolve => {
67 process.stdin.setEncoding('utf-8')
68 process.stdin.on('readable', () => {
69 let chunk
70 while ((chunk = process.stdin.read())) {
71 result += chunk
72 }
73 })
74 process.stdin.on('end', () => {
75 resolve(result)
76 })
77 })
78}

Callers 1

extractFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected