DenoDDeno
Powered by
BlockzillaB
Denoβ€’4y agoβ€’
2 replies
Blockzilla

Possible to check of a file is being run as worker?

if (import.meta.main) {
  main()
}
if (import.meta.main) {
  main()
}

is there a way to disable calling
main()
main()
if the file is being run as worker
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to check if stdin is a file?
m4rc3l05Mm4rc3l05 / help
2y ago
Is possible to spawn a worker inside an http?
IsaacR943IIsaacR943 / help
4mo ago
`deno run` as a library
palmikPpalmik / help
3y ago
How to open a file as blob?
CodyCCCodyC / help
2y ago