@ztimson/utils 0.24.10 → 0.24.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -493,7 +493,7 @@ ${opts.message || this.desc}`;
|
|
|
493
493
|
* @return {[K, T][]} Key-value pairs array
|
|
494
494
|
*/
|
|
495
495
|
entries(expired) {
|
|
496
|
-
return deepCopy(Object.entries(this.store).filter((v) => expired || !v._expired));
|
|
496
|
+
return deepCopy(Object.entries(this.store).filter((v) => expired || !(v == null ? void 0 : v._expired)));
|
|
497
497
|
}
|
|
498
498
|
/**
|
|
499
499
|
* Manually expire a cached item
|
|
@@ -511,7 +511,7 @@ ${opts.message || this.desc}`;
|
|
|
511
511
|
*/
|
|
512
512
|
get(key, expired) {
|
|
513
513
|
const cached = deepCopy(this.store[key] ?? null);
|
|
514
|
-
if (expired || !cached._expired) return cached;
|
|
514
|
+
if (expired || !(cached == null ? void 0 : cached._expired)) return cached;
|
|
515
515
|
return null;
|
|
516
516
|
}
|
|
517
517
|
/**
|