@phensley/cldr-utils
Advanced tools
Comparing version 0.16.0 to 0.17.0
@@ -42,10 +42,7 @@ var DEFAULT_CAPACITY = 100; | ||
var old = this.root.prev; | ||
/* istanbul ignore else */ | ||
if (old !== undefined) { | ||
this.storage.delete(old.key); | ||
this.storage.set(key, old); | ||
old.key = key; | ||
old.val = val; | ||
this.moveFront(old); | ||
} | ||
this.storage.delete(old.key); | ||
this.storage.set(key, old); | ||
old.key = key; | ||
old.val = val; | ||
this.moveFront(old); | ||
return; | ||
@@ -78,19 +75,9 @@ } | ||
e.next = n; | ||
/* istanbul ignore else */ | ||
if (n) { | ||
n.prev = e; | ||
} | ||
n.prev = e; | ||
return e; | ||
}; | ||
LRU.prototype.remove = function (n) { | ||
/* istanbul ignore else */ | ||
if (n.prev) { | ||
n.prev.next = n.next; | ||
} | ||
/* istanbul ignore else */ | ||
if (n.next) { | ||
n.next.prev = n.prev; | ||
} | ||
n.prev = undefined; | ||
n.next = undefined; | ||
n.prev.next = n.next; | ||
n.next.prev = n.prev; | ||
n.prev = n.next = undefined; | ||
return n; | ||
@@ -97,0 +84,0 @@ }; |
@@ -44,10 +44,7 @@ "use strict"; | ||
var old = this.root.prev; | ||
/* istanbul ignore else */ | ||
if (old !== undefined) { | ||
this.storage.delete(old.key); | ||
this.storage.set(key, old); | ||
old.key = key; | ||
old.val = val; | ||
this.moveFront(old); | ||
} | ||
this.storage.delete(old.key); | ||
this.storage.set(key, old); | ||
old.key = key; | ||
old.val = val; | ||
this.moveFront(old); | ||
return; | ||
@@ -80,19 +77,9 @@ } | ||
e.next = n; | ||
/* istanbul ignore else */ | ||
if (n) { | ||
n.prev = e; | ||
} | ||
n.prev = e; | ||
return e; | ||
}; | ||
LRU.prototype.remove = function (n) { | ||
/* istanbul ignore else */ | ||
if (n.prev) { | ||
n.prev.next = n.next; | ||
} | ||
/* istanbul ignore else */ | ||
if (n.next) { | ||
n.next.prev = n.prev; | ||
} | ||
n.prev = undefined; | ||
n.next = undefined; | ||
n.prev.next = n.next; | ||
n.next.prev = n.prev; | ||
n.prev = n.next = undefined; | ||
return n; | ||
@@ -99,0 +86,0 @@ }; |
{ | ||
"name": "@phensley/cldr-utils", | ||
"version": "0.16.0", | ||
"version": "0.17.0", | ||
"description": "Utilities for cldr-engine packages", | ||
@@ -41,3 +41,3 @@ "main": "lib/index.js", | ||
"@types/jest": "^24.0.13", | ||
"@types/node": "^10.12.21", | ||
"@types/node": "^10.14.10", | ||
"beautify-benchmark": "^0.2.4", | ||
@@ -49,4 +49,4 @@ "benchmark": "^2.1.4", | ||
"ts-jest": "^24.0.2", | ||
"tslint": "^5.14.0", | ||
"tslint-no-circular-imports": "^0.6.1", | ||
"tslint": "^5.18.0", | ||
"tslint-no-circular-imports": "^0.7.0", | ||
"typescript": "3.5.x" | ||
@@ -67,3 +67,3 @@ }, | ||
}, | ||
"gitHead": "95eec61ff1f0705b870f99d70051a8d0a1e2ff72" | ||
"gitHead": "ffcf29d76b28f325742a83e19d1ad41347a36be8" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
37009
483