MCPcopy Create free account
hub / github.com/browserbase/stagehand / isMainModule

Function isMainModule

packages/docs/scripts/runtimePaths.js:102–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100};
101
102export const isMainModule = () => {
103 const entryScript = process.argv.at(1);
104 if (!entryScript) return false;
105 return normalizePath(entryScript) === getCurrentFilePath();
106};

Callers 1

Calls 2

normalizePathFunction · 0.70
getCurrentFilePathFunction · 0.70

Tested by

no test coverage detected