mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 01:29:14 -05:00
15 lines
360 B
JavaScript
15 lines
360 B
JavaScript
|
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);
|