errorstacks
Simple parser for Error stack traces.
Currently supported browsers/platforms:
Usage
Install errorstacks
via your package manager of choice. Here we'll use npm
.
npm install errorstacks
Example code:
import { parseStackTrace } from 'errorstacks';
function foo() {
throw new Error('fail');
}
try {
foo();
} catch (err) {
const parsed = parseStackTrace(err.stack);
console.log(parsed);
Note: type
will be the string "native"
if native code execution was detected.
License
MIT, see the license file