api/store: implement has() method

This commit is contained in:
jj
2024-10-30 19:21:45 +00:00
parent 18acad19b9
commit 11314fb8d1
3 changed files with 19 additions and 0 deletions

View File

@@ -13,6 +13,15 @@ export class Store {
this.id = name;
}
async _has(_key) { throw "needs implementation" }
has(key) {
if (typeof key !== 'string') {
key = key.toString();
}
return this._has(key);
}
async _get(_key) { throw "needs implementation" }
async get(key) {
if (typeof key !== 'string') {