rastrillo / fiesta Public
| 1 | // Upcases stdin, and echoes TZ and its own arguments, so one run proves |
| 2 | // stdin, Env, Args and stdout capture. |
| 3 | const chunks = []; |
| 4 | for await (const chunk of process.stdin) chunks.push(chunk); |
| 5 | process.stdout.write(Buffer.concat(chunks).toString("utf8").toUpperCase()); |
| 6 | process.stdout.write(` tz=${process.env.TZ ?? ""} args=${process.argv.slice(2).join(",")}`); |
| 7 |