0x/test/fixture/stdin.js
Daniel X Moore eb9dfd3b6a
Allow stdin to work while profiling (#276)
* Allow stdin to work while profiling

* Added test
2023-09-04 16:34:17 +02:00

13 lines
244 B
JavaScript
Executable File

#!/usr/bin/env node
// Just echo the stdin content
const run = async () => {
const results = []
for await (const chunk of process.stdin) {
results.push(chunk)
}
return results.join('')
}
run().then((s) => process.stdout.write(s))