@isaacs/ttlcache 1.4.0 → 1.4.1
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/LICENSE +1 -1
- package/index.js +5 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The ISC License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022 - Isaac Z. Schlueter and Contributors
|
|
3
|
+
Copyright (c) 2022-2023 - Isaac Z. Schlueter and Contributors
|
|
4
4
|
|
|
5
5
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
6
|
purpose with or without fee is hereby granted, provided that the above
|
package/index.js
CHANGED
|
@@ -274,7 +274,11 @@ class TTLCache {
|
|
|
274
274
|
if (exp === 'Infinity' || exp > n) {
|
|
275
275
|
return
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
|
|
278
|
+
/* istanbul ignore next
|
|
279
|
+
* mysterious need for a guard here?
|
|
280
|
+
* https://github.com/isaacs/ttlcache/issues/26 */
|
|
281
|
+
const keys = [...(this.expirations[exp] || [])]
|
|
278
282
|
const entries = []
|
|
279
283
|
delete this.expirations[exp]
|
|
280
284
|
for (const key of keys) {
|