@stacktrace-lite/core
    Preparing search index...

    Function parseStack

    • Parse an Error.stack (or raw stack string) into normalized StackFrame objects.

      Parameters

      • error: string | Error

        The Error instance or raw stack string to parse.

      Returns StackFrame[]

      The list of parsed frames (unknown lines are preserved as raw, but dropped if both fileName and functionName are missing).

      • The function splits on newlines and tries each known pattern in order.
      • If no pattern matches, it returns a best-effort frame with only raw filled.
      • Only frames with a non-empty fileName or functionName are kept.
      try {
      throw new Error('Boom');
      } catch (e) {
      const frames = parseStack(e as Error);
      // frames[0].functionName, frames[0].fileName, etc.
      }