MCPcopy
hub / github.com/cloudflare/capnweb / isMain

Function isMain

packages/capnweb-validate/src/cli.ts:100–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98}
99
100function isMain(): boolean {
101 let entry = process.argv[1];
102 if (!entry) return false;
103 try {
104 return realpathSync(entry) === realpathSync(fileURLToPath(import.meta.url));
105 } catch {
106 return false;
107 }
108}

Callers 1

cli.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…