@aofl/cache-manager
Advanced tools
Comparing version 1.1.0 to 1.1.2
{ | ||
"name": "@aofl/cache-manager", | ||
"version": "1.1.0", | ||
"version": "1.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -60,4 +60,4 @@ import {cacheTypeEnumerate} from '../cache-type-enumerate'; | ||
getStoredKeys() { | ||
let keys = []; | ||
for (let key in this.storage) { | ||
const keys = []; | ||
for (const key in this.storage) { | ||
if (!this.storage.hasOwnProperty(key)) continue; | ||
@@ -103,3 +103,3 @@ if (key.indexOf(this.namespace + '_') === 0) { | ||
let namespaceKey = this.getNamespaceKey(key); | ||
const namespaceKey = this.getNamespaceKey(key); | ||
this.storage.setItem(namespaceKey, obj); | ||
@@ -140,3 +140,3 @@ this.storedKeys.push(namespaceKey); | ||
getCollection() { | ||
let collection = {}; | ||
const collection = {}; | ||
for (let i = 0; i < this.storedKeys.length; i++) { | ||
@@ -157,4 +157,4 @@ if (this.isExpired(this.storedKeys[i])) continue; | ||
removeItem(key) { | ||
let namespaceKey = this.getNamespaceKey(key); | ||
let index = this.storedKeys.indexOf(namespaceKey); | ||
const namespaceKey = this.getNamespaceKey(key); | ||
const index = this.storedKeys.indexOf(namespaceKey); | ||
@@ -189,3 +189,3 @@ if (index > -1) { | ||
let namespaceKey = this.getNamespaceKey(key); | ||
const namespaceKey = this.getNamespaceKey(key); | ||
let obj = this.storage.getItem(namespaceKey); | ||
@@ -192,0 +192,0 @@ if (this.storageType === cacheTypeEnumerate.LOCAL || |
@@ -15,3 +15,3 @@ /** | ||
static clear() { | ||
for (let key in MemoryStorage) { | ||
for (const key in MemoryStorage) { | ||
if (MemoryStorage.hasOwnProperty(key)) { | ||
@@ -31,3 +31,3 @@ MemoryStorage.removeItem(key); | ||
let length = 0; | ||
for (let key in MemoryStorage) { | ||
for (const key in MemoryStorage) { | ||
if (MemoryStorage.hasOwnProperty(key)) { | ||
@@ -34,0 +34,0 @@ length++; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
34450
0