mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
11 lines
256 B
JavaScript
11 lines
256 B
JavaScript
var stdout = Bun.stdout.writer();
|
|
console.error("Started");
|
|
var count = 0;
|
|
for await (let chunk of Bun.stdin.stream()) {
|
|
const str = new Buffer(chunk).toString();
|
|
stdout.write(str);
|
|
stdout.flush();
|
|
count++;
|
|
}
|
|
console.error("Finished with", count);
|