Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

error-stack-parser

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-stack-parser

Extract meaning from JS Errors

  • 2.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13M
increased by7.22%
Maintainers
2
Weekly downloads
 
Created

What is error-stack-parser?

The error-stack-parser package is a utility for parsing and extracting information from JavaScript Error stacks. It provides a structured way to interpret error stack strings, making it easier to programmatically analyze errors, log them in a more readable format, or display them in user interfaces. It's particularly useful in applications where understanding the context and source of an error is crucial for debugging or error handling.

What are error-stack-parser's main functionalities?

Parsing Error Stacks

This feature allows you to parse the stack property of Error objects into a more structured format. Each element in the returned array represents a frame in the stack trace, with properties such as the function name, file name, line number, and column number. This makes it easier to analyze and display error information programmatically.

const ErrorStackParser = require('error-stack-parser');
const error = new Error('This is a test error');
const stackFrames = ErrorStackParser.parse(error);
console.log(stackFrames);

Other packages similar to error-stack-parser

Keywords

FAQs

Package last updated on 05 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc