Comparing version 1.3.0 to 1.4.0
@@ -27,2 +27,3 @@ (function() { | ||
this.callCount = 0; | ||
this.stackCount = 0; | ||
this.stacks = {}; | ||
@@ -99,2 +100,6 @@ this.stackCallCounts = {}; | ||
Deprecation.prototype.getStackCount = function() { | ||
return this.stackCount; | ||
}; | ||
Deprecation.prototype.getCallCount = function() { | ||
@@ -105,3 +110,3 @@ return this.callCount; | ||
Deprecation.prototype.addStack = function(stack, metadata) { | ||
var callerLocation, _base, _base1, _base2; | ||
var callerLocation, _base, _base1; | ||
if (this.originName == null) { | ||
@@ -119,7 +124,8 @@ this.originName = this.getFunctionNameFromCallsite(stack[0]); | ||
callerLocation = this.getLocationFromCallsite(stack[1]); | ||
if ((_base1 = this.stacks)[callerLocation] == null) { | ||
_base1[callerLocation] = stack; | ||
if (this.stacks[callerLocation] == null) { | ||
this.stacks[callerLocation] = stack; | ||
this.stackCount++; | ||
} | ||
if ((_base2 = this.stackCallCounts)[callerLocation] == null) { | ||
_base2[callerLocation] = 0; | ||
if ((_base1 = this.stackCallCounts)[callerLocation] == null) { | ||
_base1[callerLocation] = 0; | ||
} | ||
@@ -126,0 +132,0 @@ return this.stackCallCounts[callerLocation]++; |
{ | ||
"name": "grim", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Log usage of deprecated methods", | ||
@@ -5,0 +5,0 @@ "main": "./lib/grim", |
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
12111
237