Comparing version 4.0.0 to 4.1.0
17
index.js
export default function callsites() { | ||
const _prepareStackTrace = Error.prepareStackTrace; | ||
Error.prepareStackTrace = (_, stack) => stack; | ||
const stack = new Error().stack.slice(1); // eslint-disable-line unicorn/error-message | ||
Error.prepareStackTrace = _prepareStackTrace; | ||
return stack; | ||
try { | ||
let result = []; | ||
Error.prepareStackTrace = (_, callSites) => { | ||
const callSitesWithoutCurrent = callSites.slice(1); | ||
result = callSitesWithoutCurrent; | ||
return callSitesWithoutCurrent; | ||
}; | ||
new Error().stack; // eslint-disable-line unicorn/error-message, no-unused-expressions | ||
return result; | ||
} finally { | ||
Error.prepareStackTrace = _prepareStackTrace; | ||
} | ||
} |
{ | ||
"name": "callsites", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "Get callsites from the V8 stack trace API", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
6527
84