error-stack-parser (2.1.4)
Published 2026-02-24 13:55:57 +00:00 by atheaadmin
Installation
registry=npm install error-stack-parser@2.1.4"error-stack-parser": "2.1.4"About this package
error-stack-parser.js - Extract meaning from JS Errors
Simple, cross-browser Error parser.
This library parses and extracts function names, URLs, line numbers, and column numbers from the given Error's stack as
an Array of StackFrames.
Once you have parsed out StackFrames, you can do much more interesting things. See stacktrace-gps.
Note that in IE9 and earlier, Error objects don't have enough information to extract much of anything. In IE 10, Errors
are given a stack once they're thrown.
Browser Support
Usage
ErrorStackParser.parse(new Error('BOOM'));
=> [
StackFrame({functionName: 'foo', args: [], fileName: 'path/to/file.js', lineNumber: 35, columnNumber: 79, isNative: false, isEval: false}),
StackFrame({functionName: 'Bar', fileName: 'https://cdn.somewherefast.com/utils.min.js', lineNumber: 1, columnNumber: 832, isNative: false, isEval: false, isConstructor: true}),
StackFrame(... and so on ...)
]
Installation
npm install error-stack-parser
bower install error-stack-parser
https://raw.githubusercontent.com/stacktracejs/error-stack-parser/master/dist/error-stack-parser.min.js
Contributing
Want to be listed as a Contributor? Start with the Contributing Guide!
Dependencies
Dependencies
| ID | Version |
|---|---|
| stackframe | ^1.3.4 |
Development Dependencies
| ID | Version |
|---|---|
| eslint | ^8.17.0 |
| jasmine | ^4.1.0 |
| jasmine-core | ^4.1.1 |
| karma | ^6.3.20 |
| karma-chrome-launcher | ^3.1.1 |
| karma-coverage | ^2.2.0 |
| karma-coveralls | ^2.1.0 |
| karma-firefox-launcher | ^2.1.2 |
| karma-ie-launcher | ^1.0.0 |
| karma-jasmine | ^4.0.2 |
| karma-opera-launcher | ^1.0.0 |
| karma-phantomjs-launcher | ^1.0.4 |
| karma-safari-launcher | ^1.0.0 |
| karma-sauce-launcher | ^4.3.6 |
| karma-spec-reporter | ^0.0.34 |
| uglify-es | ^3.3.9 |
Keywords
stacktrace
error
stack
parser