Comparing version 4.1.0 to 4.2.0
@@ -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 @@ |
{ | ||
"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. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7134
96
44