stacktrace-parser
Parses every stack trace into a nicely formatted array of hashes.
Last updated 5 years ago by calamari .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install stacktrace-parser 
SYNC missed versions from official npm registry.

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)

Current Tags

  • 0.1.10                                ...           latest (5 years ago)

10 Versions

  • 0.1.10                                ...           5 years ago
  • 0.1.9                                ...           5 years ago
  • 0.1.8                                ...           5 years ago
  • 0.1.7                                ...           5 years ago
  • 0.1.6                                ...           6 years ago
  • 0.1.5                                ...           6 years ago
  • 0.1.4                                ...           8 years ago
  • 0.1.3                                ...           9 years ago
  • 0.1.2                                ...           9 years ago
  • 0.1.1                                ...           11 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (16)

© 2010 - cnpmjs.org x YWFE | Home | YWFE