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

callsites

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

callsites - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

15

index.d.ts

@@ -68,2 +68,17 @@ type AnyFunction = (...args: any[]) => any;

isConstructor(): boolean;
/**
Returns `true` if this call is asynchronous (i.e. `await`, `Promise.all()`, or `Promise.any()`).
*/
isAsync(): boolean;
/**
Returns `true` if this is an asynchronous call to `Promise.all()`.
*/
isPromiseAll(): boolean;
/**
Returns the index of the promise element that was followed in `Promise.all()` or `Promise.any()` for async stack traces, or `null` if the `CallSite` is not an asynchronous `Promise.all()` or `Promise.any()` call.
*/
getPromiseIndex(): number | null;
}

@@ -70,0 +85,0 @@

4

package.json
{
"name": "callsites",
"version": "4.1.0",
"version": "4.2.0",
"description": "Get callsites from the V8 stack trace API",

@@ -15,2 +15,4 @@ "license": "MIT",

"exports": "./index.js",
"types": "./index.d.ts",
"sideEffects": false,
"engines": {

@@ -17,0 +19,0 @@ "node": ">=12.20"

@@ -7,5 +7,5 @@ # callsites

```sh
npm install callsites
```
$ npm install callsites
```

@@ -38,17 +38,8 @@ ## Usage

- `getEvalOrigin`: If this function was created using a call to `eval` returns a string representing the location where `eval` was called.
- `isToplevel`: Is this a top-level invocation, that is, is this the global object?
- `isEval`: Does this call take place in code defined by a call to `eval`?
- `isNative`: Is this call in native V8 code?
- `isConstructor`: Is this a constructor call?
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-callsites?utm_source=npm-callsites&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
- `isToplevel`: Returns `true` if this is a top-level invocation, that is, if it's a global object.
- `isEval`: Returns `true` if this call takes place in code defined by a call to `eval`.
- `isNative`: Returns `true` if this call is in native V8 code.
- `isConstructor`: Returns `true` if this is a constructor call.
- `isAsync()`: Returns `true` if this call is asynchronous (i.e. `await`, `Promise.all()`, or `Promise.any()`).
- `isPromiseAll()`: Returns `true` if this is an asynchronous call to `Promise.all()`.
- `getPromiseIndex()`: Returns the index of the promise element that was followed in `Promise.all()` or `Promise.any()` for async stack traces, or `null` if the `CallSite` is not an asynchronous `Promise.all()` or `Promise.any()` call.
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