/ student-intifada / node_modules / error-stack-parser-es /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]dist/a year ago -  
[   ]LICENSEa year ago1.1K 
[TXT]README.mda year ago1.4K595aea1 more query options + view options [كارل مبارك]
[   ]package.jsona year ago2.1Kafd0ccc remove unused [كارل مبارك]
README.md

error-stack-parser-es

NPM version

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!'))
// [{ file: 'file.js', name: 'method', line: 1, col: 2}]

It also allows you to parse directly from a stacktrace string (which does not support Opera stacktrace format).

import { parseStack } from 'error-stack-parser-es/lite'

const stacktrace = parseStack('Error\n    at method (file.js:1:2)')
// [{ file: 'file.js', name: 'method', line: 1, col: 2}]

License

MIT License © 2023-PRESENT Anthony Fu MIT License © 2017 Eric Wendelin

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80