Added size getter for cache
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/utils",
|
||||
"version": "0.30.1",
|
||||
"version": "0.30.2",
|
||||
"description": "Utility library",
|
||||
"author": "Zak Timson",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user