blob: e8630498107d9e25e8ef5fc3bd39ca3def783ab7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import process from "node:process";
import util from "node:util";
console.log("START");
globalThis.addEventListener("unload", () => console.log("END"));
const args = util.parseArgs({ options: { unref: { type: "boolean" } } });
// call stdin.unref if --unref is passed
if (args.values.unref) {
process.stdin.unref();
}
process.stdin.pipe(process.stdout);
|