Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 25, 2024 via pnpm

callsites 3.1.0

Get callsites from the V8 stack trace API
Package summary
Share
0
issues
1
license
1
MIT
Package created
19 Apr 2014
Version published
6 Apr 2019
Maintainers
1
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:
callsites@3.1.0
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 callsites 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does callsites do?

Callsites is an npm package built for JavaScript applications that makes it possible to retrieve callsites (a location in the program's source code where a given function is invoked) from the V8 stack trace API. It forms a crucial part of debugging JavaScript code, as it provides a vast range of information about function invocations including their names, current line numbers, column numbers, script origins, and much more.

How do you use callsites?

Using callsites in your JavaScript application is fairly straightforward. You'll first need to install the package using npm with the command npm install callsites. After installation, you can import it into your file with the statement import callsites from 'callsites' and then use it by invoking the function 'callsites()' in your program. For example:

import callsites from 'callsites';

function exampleFunction() {
	console.log(callsites()[0].getFileName());
	// This will output the file name of the script where the function was invoked
}

exampleFunction();

Where are the callsites docs?

The callsites documentation is available in the package's README file on its GitHub repository, accessible through https://github.com/sindresorhus/callsites. The README file provides a comprehensive overview of the package, its installation, and usage guidelines. It also details the API, which outlines the methods available for a callsite object, such as getThis, getTypeName, getFunctionName, getFileName, and more. For more in-depth understanding of the V8 stack trace API which callsites is built upon, refer to the V8 official documentation at https://v8.dev/docs/stack-trace-api.