aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lru-cache
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/lru-cache
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
update packages
Diffstat (limited to 'node_modules/lru-cache')
-rw-r--r--node_modules/lru-cache/README.md8
-rw-r--r--node_modules/lru-cache/index.js2
-rw-r--r--node_modules/lru-cache/package.json4
3 files changed, 10 insertions, 4 deletions
diff --git a/node_modules/lru-cache/README.md b/node_modules/lru-cache/README.md
index f646c1cb8..d660dd574 100644
--- a/node_modules/lru-cache/README.md
+++ b/node_modules/lru-cache/README.md
@@ -25,10 +25,16 @@ cache.set("key", "value")
cache.get("key") // "value"
// non-string keys ARE fully supported
-var someObject = {}
+// but note that it must be THE SAME object, not
+// just a JSON-equivalent object.
+var someObject = { a: 1 }
cache.set(someObject, 'a value')
+// Object keys are not toString()-ed
cache.set('[object Object]', 'a different value')
assert.equal(cache.get(someObject), 'a value')
+// A similar object with same keys/values won't work,
+// because it's a different object identity
+assert.equal(cache.get({ a: 1 }), undefined)
cache.reset() // empty the cache
```
diff --git a/node_modules/lru-cache/index.js b/node_modules/lru-cache/index.js
index 460462aad..3f047f8ca 100644
--- a/node_modules/lru-cache/index.js
+++ b/node_modules/lru-cache/index.js
@@ -15,7 +15,7 @@ var hasSymbol = typeof Symbol === 'function'
var makeSymbol
if (hasSymbol) {
makeSymbol = function (key) {
- return Symbol.for(key)
+ return Symbol(key)
}
} else {
makeSymbol = function (key) {
diff --git a/node_modules/lru-cache/package.json b/node_modules/lru-cache/package.json
index 3d2e10e9f..e54b54f8b 100644
--- a/node_modules/lru-cache/package.json
+++ b/node_modules/lru-cache/package.json
@@ -1,7 +1,7 @@
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
- "version": "4.1.1",
+ "version": "4.1.3",
"author": "Isaac Z. Schlueter <i@izs.me>",
"keywords": [
"mru",
@@ -20,7 +20,7 @@
"devDependencies": {
"benchmark": "^2.1.4",
"standard": "^5.4.1",
- "tap": "^10.3.3"
+ "tap": "^11.1.4"
},
"license": "ISC",
"dependencies": {