Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 6, 2024 via pnpm

stack-trace 0.0.10

Get v8 stack traces as an array of CallSite objects.
Package summary
Share
0
issues
1
license
1
MIT
Package created
25 Jun 2011
Version published
16 May 2017
Maintainers
6
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
stack-trace@0.0.10
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of stack-trace 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does stack-trace do?

Stack-Trace is a powerful npm package that allows you to access V8 stack traces as an array of CallSite objects. This feature gives developers insights into the function calls that have been made within the V8 JavaScript engine at the time the stack was created, making it an invaluable tool for debugging and understanding your code's behavior.

How do you use stack-trace?

The usage of Stack-Trace is straightforward and intuitive. First, you'd want to install it using npm by running npm install stack-trace in your terminal.

Below is an example of how to capture the current stack:

import { get } from 'stack-trace';
const trace = get();
expect(trace[0].getFileName()).toBe(__filename);

Stack-Trace is also equipped to parse an Error object in instances where the stack you're interested in has already been popped. A simple representation is as follows:

import { parse } from 'stack-trace';
const err = new Error('something went wrong');
const trace = parse(err);
expect(trace[0].getFileName()).toBe(__filename);

Remember, parsing the Error#stack property may not retrieve all properties. For more details on returned properties, you'd want to refer to the API docs.

Where are the stack-trace docs?

For comprehensive information on Stack-Trace and its API, including stackTrace.get([belowFn]), stackTrace.parse(err), and details about the CallSite object, refer to the official V8 CallSite object API documentation here. Knowing how to configure and use Stack-Trace will aid greatly in your JavaScript debugging and development process.