lru: minor.

This commit is contained in:
Christopher Jeffrey 2017-11-16 18:00:46 -08:00
parent 405feef9ce
commit 91ee6077b1
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -122,8 +122,6 @@ class LRU {
if (this.capacity === 0)
return;
key = String(key);
let item = this.map.get(key);
if (item) {
@ -158,8 +156,6 @@ class LRU {
if (this.capacity === 0)
return null;
key = String(key);
const item = this.map.get(key);
if (!item)
@ -180,7 +176,7 @@ class LRU {
has(key) {
if (this.capacity === 0)
return false;
return this.map.has(String(key));
return this.map.has(key);
}
/**
@ -193,8 +189,6 @@ class LRU {
if (this.capacity === 0)
return false;
key = String(key);
const item = this.map.get(key);
if (!item)