lru-cache-node
Advanced tools
Comparing version
{ | ||
"name": "lru-cache-node", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "A lighting fast cache manager for node with least-recently-used policy.", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"test": "ava -s" | ||
"test": "nyc ava", | ||
"report-coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov" | ||
}, | ||
@@ -21,3 +22,4 @@ "repository": { | ||
"devDependencies": { | ||
"ava": "1.0.0-beta.4" | ||
"ava": "1.0.0-beta.4", | ||
"nyc": "^15.0.0" | ||
}, | ||
@@ -24,0 +26,0 @@ "files": [ |
@@ -1,2 +0,5 @@ | ||
# lru-cache-node | ||
# lru-cache-node | ||
[](https://travis-ci.org/arbazsiddiqui/lru-cache-node) | ||
[](https://codecov.io/gh/arbazsiddiqui/lru-cache-node) | ||
[](https://npmjs.com/package/lru-cache-node) | ||
@@ -125,2 +128,6 @@ > A lighting fast cache manager for node with least-recently-used policy. | ||
### has(key) | ||
Alias for `contains` function. | ||
### getSize() | ||
@@ -152,3 +159,3 @@ | ||
Takes a function and iterates over all the keys in the cache, in order of recent-ness. Callback takes `key`, `value` and `index` as params. | ||
Takes a function and iterates over all the keys in the cache, in order of recentness. Callback takes `key`, `value` and `index` as params. | ||
```js | ||
@@ -167,2 +174,2 @@ let cache = new Cache(); | ||
*/ | ||
``` | ||
``` |
@@ -104,2 +104,6 @@ class Cache { | ||
has(key) { | ||
return this.contains(key); | ||
} | ||
forEach(callback) { | ||
@@ -155,2 +159,2 @@ let node = this.head; | ||
module.exports = Cache; | ||
module.exports = Cache; |
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
8881
23.06%4
33.33%139
2.96%173
4.85%2
100%1
Infinity%