Comparing version 0.5.2 to 0.5.3
34
index.js
@@ -35,16 +35,14 @@ #!/usr/bin/env node | ||
Object.defineProperty(global, '__stack', { | ||
get: function(){ | ||
Error.prepareStackTrace = hooked | ||
var err = new Error(); | ||
var stack = err.stack.map(function (item) { | ||
return { | ||
file: item.getFileName(), | ||
line: item.getLineNumber() | ||
}; | ||
}); | ||
Error.prepareStackTrace = _Error_prepareStackTrace; | ||
return stack; | ||
} | ||
}); | ||
function getStack() { | ||
Error.prepareStackTrace = hooked | ||
var err = new Error(); | ||
var stack = err.stack.map(function (item) { | ||
return { | ||
file: item.getFileName(), | ||
line: item.getLineNumber() | ||
}; | ||
}); | ||
Error.prepareStackTrace = _Error_prepareStackTrace; | ||
return stack; | ||
} | ||
@@ -89,3 +87,3 @@ function findCallsite(stack) { | ||
var stack = __stack; | ||
var stack = getStack(); | ||
@@ -159,3 +157,3 @@ // this should inherit 'name' and 'length' and any other properties that have been assigned | ||
EventEmitter.init = function () { | ||
var callSite = findCallsite(__stack); | ||
var callSite = findCallsite(getStack()); | ||
if (callSite && !this.hasOwnProperty('__callSite')) { | ||
@@ -167,3 +165,3 @@ Object.defineProperties(this, { | ||
writable: false, | ||
value: findCallsite(__stack) | ||
value: findCallsite(getStack()) | ||
} | ||
@@ -271,3 +269,3 @@ }); | ||
writable: false, | ||
value: findCallsite(__stack) | ||
value: findCallsite(getStack()) | ||
}, | ||
@@ -274,0 +272,0 @@ __worker: { |
{ | ||
"name": "wtfnode", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Utility to help find out why Node isn't exiting", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
31282
634