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

stack-trace

Package Overview
Dependencies
Maintainers
6
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stack-trace

Get v8 stack traces as an array of CallSite objects.

  • 1.0.0-pre2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12M
decreased by-6.59%
Maintainers
6
Weekly downloads
 
Created

What is stack-trace?

The stack-trace npm package is used to extract stack traces in Node.js applications. It provides a way to get structured stack trace information from the V8 stack frames, allowing developers to programmatically inspect and manipulate stack traces.

What are stack-trace's main functionalities?

Get an array of CallSites from the current call stack

This feature allows you to retrieve an array of CallSite objects, each representing a frame in the call stack. This can be useful for debugging or logging purposes.

const stackTrace = require('stack-trace');
const trace = stackTrace.get();
console.log(trace);

Parse an Error's stack trace

This feature enables you to parse the stack trace of a given Error object into a structured format, making it easier to read and process.

const stackTrace = require('stack-trace');
const error = new Error('Example error');
const parsedStack = stackTrace.parse(error);
console.log(parsedStack);

Other packages similar to stack-trace

FAQs

Package last updated on 09 Feb 2023

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