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 CHANGED
@@ -5910,7 +5910,7 @@ class LruCache {
5910
5910
  return value;
5911
5911
  }
5912
5912
  set(key, value) {
5913
- if (this.values.size >= this.max) {
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,
@@ -6,4 +6,6 @@ export declare class LruCache<T> {
6
6
  get(key: string): T | undefined;
7
7
  set(key: string, value: T): void;
8
8
  delete(key: string): boolean;
9
+ clear(): void;
10
+ size(): number;
9
11
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.13.5",
2
+ "version": "0.14.0",
3
3
  "name": "modality-kit",
4
4
  "repository": {
5
5
  "type": "git",