error-stack-parser-es is a modern, TypeScript-rewritten port of the original `stacktracejs/error-stack-parser` library, specifically designed for ES Modules environments. It provides robust functionality for parsing JavaScript `Error` objects and extracting detailed stack frame information, making it suitable for error reporting and debugging tools. The current stable version is 1.0.5, which recently adopted an 'Epoch SemVer' strategy, indicating a potential shift in versioning philosophy without a breaking change in behavior from the previous major release. It offers both a standard API and a 'lite' version with simplified stack frame representations (e.g., `line` and `col` instead of `lineNumber` and `columnNumber`) and the ability to parse raw stacktrace strings, providing flexibility for different use cases. Its key differentiators include native TypeScript support, ES Modules first design, and a streamlined 'lite' API.
npm install error-stack-parser-esVerified import paths — ran on the pinned version, not inferred.
Demonstrates parsing an `Error` object using both the standard and 'lite' APIs, and parsing a raw stack string with the 'lite' API.
Thoroughly review release notes for versions `1.x.x` and above before upgrading, as 'Epoch SemVer' implies breaking changes might occur within the '1' epoch.
For Opera stack traces, ensure you capture and pass an `Error` object to `import { parse } from 'error-stack-parser-es'` instead of a raw string to `parseStack`.Always use `import` statements for `error-stack-parser-es`. If working in a CommonJS-only Node.js environment, consider using dynamic `import()` or transpiling your code.
Ensure the input to `parse` or `parseStack` is a valid `Error` instance or a non-empty string representing a stack trace.
Update your import statement to `import { parse } from 'error-stack-parser-es'` and ensure your environment supports ES Modules.No dependency data recorded yet.