MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / isMainModule

Function isMainModule

compatible-shell/src/cli.mjs:354–358  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

352}
353
354function isMainModule() {
355 const currentFile = fileURLToPath(import.meta.url)
356 const entry = process.argv[1] ? path.resolve(process.argv[1]) : ''
357 return currentFile === entry
358}
359
360if (isMainModule()) {
361 main().catch(error => {

Callers 1

cli.mjsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected