modality-kit 0.13.5 → 0.14.0
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.js +7 -1
- package/dist/types/lruCache.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5910,7 +5910,7 @@ class LruCache {
|
|
|
5910
5910
|
return value;
|
|
5911
5911
|
}
|
|
5912
5912
|
set(key, value) {
|
|
5913
|
-
if (this.
|
|
5913
|
+
if (this.size() >= this.max) {
|
|
5914
5914
|
const itemsToEvictCount = Math.max(1, Math.floor(this.max * 0.25));
|
|
5915
5915
|
const keys = this.values.keys();
|
|
5916
5916
|
let count = 0;
|
|
@@ -5928,6 +5928,12 @@ class LruCache {
|
|
|
5928
5928
|
delete(key) {
|
|
5929
5929
|
return this.values.delete(key);
|
|
5930
5930
|
}
|
|
5931
|
+
clear() {
|
|
5932
|
+
this.values.clear();
|
|
5933
|
+
}
|
|
5934
|
+
size() {
|
|
5935
|
+
return this.values.size;
|
|
5936
|
+
}
|
|
5931
5937
|
}
|
|
5932
5938
|
export {
|
|
5933
5939
|
withErrorHandling,
|
package/dist/types/lruCache.d.ts
CHANGED
package/package.json
CHANGED