error-stack-parser-es
A port of stacktracejs/error-stack-parser, rewrite with TypeScript and ES Modules.
Usage
import { parse } from 'error-stack-parser-es'
const stacktrace = parse(new Error('BOOM!'))
Refer to stacktracejs/error-stack-parser for more details.
Lite API
Additionally, this fork added a lite version of the API representation for the stack frames. You can import it from error-stack-parser-es/lite
. For example, line
and col
instead of lineNumber
and columnNumber
.
import { parse } from 'error-stack-parser-es/lite'
const stacktrace = parse(new Error('BOOM!'))
License
MIT License © 2023-PRESENT Anthony Fu
MIT License © 2017 Eric Wendelin