Comparing version 0.1.14 to 0.1.15
@@ -51,2 +51,3 @@ // Copyright Teleportd | ||
var invalidate; /* invalidate(key{optional}) */ | ||
var count; /* size() */ | ||
@@ -139,9 +140,3 @@ //private | ||
dte: Date.now() }; | ||
var count = 0; | ||
for(var s in my.cache) { | ||
if(my.cache.hasOwnProperty(s)) { | ||
count ++; | ||
} | ||
} | ||
var count = that.count(); | ||
if(count > my.size) | ||
@@ -163,2 +158,15 @@ evict[my.modes[my.evict]](count); | ||
}; | ||
/** | ||
* @return count the number of elements within the cache. | ||
*/ | ||
count = function() { | ||
var count = 0; | ||
for(var s in my.cache) { | ||
if(my.cache.hasOwnProperty(s)) { | ||
count ++; | ||
} | ||
} | ||
return count; | ||
}; | ||
@@ -193,2 +201,3 @@ /** | ||
base.method(that, 'invalidate', invalidate, _super); | ||
base.method(that, 'count', count, _super); | ||
@@ -195,0 +204,0 @@ return that; |
{ | ||
"name": "fwk", | ||
"version": "0.1.14", | ||
"version": "0.1.15", | ||
"description": "Simple JS framework for node.js", | ||
@@ -5,0 +5,0 @@ "keywords": ["fwk", "node"], |
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
30719
945