Socket
Socket
Sign inDemoInstall

callsite-record

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

callsite-record - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

17

lib/index.js

@@ -19,2 +19,12 @@ var fs = require('fs');

// Utils
function getFrameTypeName (frame) {
// NOTE: this throws in node 10 for non-methods
try {
return frame.getTypeName();
}
catch (err) {
return null;
}
}
function findClosestNonNativeAncestorFrameIdx (stackFrames, curIdx) {

@@ -219,6 +229,7 @@ for (var i = curIdx + 1; i < stackFrames.length; i++) {

for (var i = 0; i < stackFrames.length; i++) {
var frame = stackFrames[i];
var isMemberCall = typeName && frame.getMethodName() === fnName && frame.getTypeName() === typeName;
var frame = stackFrames[i];
var fnNameMatch = frame.getFunctionName() === fnName || frame.getMethodName() === fnName;
var typeNameMatch = !typeName || getFrameTypeName(frame) === typeName;
if (isMemberCall || frame.getFunctionName() === fnName) {
if (fnNameMatch && typeNameMatch) {
var callsiteFrameIdx = findClosestNonNativeAncestorFrameIdx(stackFrames, i);

@@ -225,0 +236,0 @@

2

package.json
{
"name": "callsite-record",
"version": "3.0.1",
"version": "3.0.2",
"description": "Create fancy log entries for errors and function call sites.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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