Added size getter for cache
All checks were successful
Build / Publish Docs (push) Successful in 38s
Build / Build NPM Project (push) Successful in 44s
Build / Tag Version (push) Successful in 15s

This commit is contained in:
2026-07-24 22:04:45 -04:00
parent f9971d7ce1
commit 91f4abf1f1
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@ztimson/utils",
"version": "0.30.1",
"version": "0.30.2",
"description": "Utility library",
"author": "Zak Timson",
"license": "MIT",

View File

@@ -31,7 +31,7 @@ export class Cache<K extends string | number | symbol, T> {
/** Await initial loading */
loading = new Promise<void>(r => this._loading = r);
get size() { return this.store.size; }
get size() { return this.store.keys().toArray().length }
/**
* Create new cache