lru: minor.
This commit is contained in:
parent
405feef9ce
commit
91ee6077b1
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user