Compare commits
2 Commits
0.30.0
...
91f4abf1f1
| Author | SHA1 | Date | |
|---|---|---|---|
| 91f4abf1f1 | |||
| f9971d7ce1 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/utils",
|
||||
"version": "0.30.0",
|
||||
"version": "0.30.2",
|
||||
"description": "Utility library",
|
||||
"author": "Zak Timson",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -31,6 +31,8 @@ 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.keys().toArray().length }
|
||||
|
||||
/**
|
||||
* Create new cache
|
||||
* @param {keyof T} key Default property to use as primary key
|
||||
|
||||
Reference in New Issue
Block a user