1. stacktrace-parser
Parses every stack trace into a nicely formatted array of hashes.
stacktrace-parser
Package: stacktrace-parser
Created by: errwischt
Last modified: Sun, 26 Jun 2022 23:41:40 GMT
Version: 0.1.10
License: MIT
Downloads: 12,719,067
Repository: https://github.com/errwischt/stacktrace-parser

Install

npm install stacktrace-parser
yarn add stacktrace-parser

Build Status dependencies dev-dependencies

StackTrace-Parser

This parser parses a stack trace from any browser or Node.js and returns an array of hashes each representing a line.

The goal here is to support every browser even old Internet Explorer stack traces will work.

Install

npm install stacktrace-parser

Usage

 import * as stackTraceParser from 'stacktrace-parser';

try {
  throw new Error('My error');
} catch(ex) {
  const stack = stackTraceParser.parse(ex.stack);
}

Every line contains five properties: lineNumber, methodName, arguments, file and column (if applicable).

TODOs

  • parse stack traces from other sources (Ruby, etc) (v0.3)

Contribution

If you want to contrib, then do you thing, write tests, run npm run test ensure that everything is green,
commit and make the pull request. Or just write an issue, or let's talk.

Contributors

LICENSE

The MIT License (MIT)

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code