mirror of
https://github.com/denoland/deno
synced 2024-10-16 21:12:34 +00:00
215 B
215 B
Testing if current file is the main program
To test if the current script has been executed as the main input to the program
check import.meta.main
.
if (import.meta.main) {
console.log("main");
}