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

Function readCallsitePath

packages/docs/scripts/runtimePaths.js:39–46  ·  view source on GitHub ↗
(callsite)

Source from the content-addressed store, hash-verified

37};
38
39const readCallsitePath = (callsite) => {
40 const rawPath =
41 callsite.getFileName?.() ?? callsite.getScriptNameOrSourceURL?.();
42 if (!rawPath) return null;
43 if (rawPath.startsWith("node:")) return null;
44 if (EVAL_FRAMES.has(rawPath)) return null;
45 return normalizePath(rawPath);
46};
47
48const isInternalCallsite = (callsite) => {
49 const functionName = callsite.getFunctionName?.();

Callers 1

resolveCallerFilePathFunction · 0.70

Calls 1

normalizePathFunction · 0.70

Tested by

no test coverage detected