MCPcopy Create free account
hub / github.com/aidenybai/bippy / getNonStandardStacktrace

Function getNonStandardStacktrace

packages/bippy/src/source/parse-stack.ts:22–28  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

20
21const FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
22const CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
23const SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code\])?$/;
24
25export const parseStack = (stackString: string, options?: ParseOptions): StackFrame[] => {
26 if (options?.includeInElement !== false) {
27 const lines = stackString.split("\n");
28 const frames: StackFrame[] = [];
29 for (const rawLine of lines) {
30 if (/^\s*at\s+/.test(rawLine)) {
31 if (CHROME_IE_STACK_REGEXP.test(rawLine)) frames.push(parseV8Line(rawLine));

Callers 2

parseOperaFunction · 0.85
parseOpera10Function · 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…