+11
-5
@@ -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]++; |
+1
-1
| { | ||
| "name": "grim", | ||
| "version": "1.3.0", | ||
| "version": "1.4.0", | ||
| "description": "Log usage of deprecated methods", | ||
@@ -5,0 +5,0 @@ "main": "./lib/grim", |
12111
1.11%237
2.16%