Comparing version 2.1.0 to 2.2.0
@@ -38,2 +38,6 @@ module.exports = function (max) { | ||
else update(key, value) | ||
}, | ||
clear: function () { | ||
cache = Object.create(null) | ||
_cache = Object.create(null) | ||
} | ||
@@ -40,0 +44,0 @@ } |
{ | ||
"name": "hashlru", | ||
"description": "simpler faster substitute for LRU", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"homepage": "https://github.com/dominictarr/hashlru", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -83,2 +83,14 @@ # hashlru | ||
### lru.has(key) => boolean | ||
Checks if the `key` is in the cache. | ||
### lru.remove(key) | ||
Removes the `key` from the cache. | ||
### lru.clear() | ||
Empties the entire cache. | ||
## License | ||
@@ -88,1 +100,4 @@ | ||
@@ -42,1 +42,6 @@ var assert = require('assert') | ||
assert.equal(lru.has('test2'), false) | ||
// clear | ||
assert.equal(lru.has('test'), true) | ||
lru.clear() | ||
assert.equal(lru.has('test'), false) |
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
8320
103
102