From 91ee6077b122ff9c1011618bb999b7e8497f1263 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 16 Nov 2017 18:00:46 -0800 Subject: [PATCH] lru: minor. --- lib/utils/lru.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/utils/lru.js b/lib/utils/lru.js index 58f56e06..be4ae297 100644 --- a/lib/utils/lru.js +++ b/lib/utils/lru.js @@ -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)