diff options
| author | Adam Soltys <[email protected]> | 2026-02-14 15:46:01 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-14 15:46:01 -0800 |
| commit | 526b21bc668c453250ebce8dece9ba330bac0133 (patch) | |
| tree | 5e9c84a2cca6b4a5766c6cdc9f33f6c62f5776f3 /lib/db.ts | |
| parent | 843c343db567cd224dadf347ac16736bdc8b24a8 (diff) | |
| download | coinos-server-526b21bc668c453250ebce8dece9ba330bac0133.tar.gz coinos-server-526b21bc668c453250ebce8dece9ba330bac0133.zip | |
custodial ark sends
Diffstat (limited to 'lib/db.ts')
| -rw-r--r-- | lib/db.ts | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -67,9 +67,15 @@ export const g = async (k) => { export const s = (k, v) => { if (k === "user:null" || k === "user:undefined") fail("null user"); - db.set(k, JSON.stringify(v)); + return db.set(k, JSON.stringify(v)); }; +export async function* scan(pattern: string) { + for await (const keys of db.scanIterator({ MATCH: pattern })) { + for (const k of keys) yield k; + } +} + export const ga = async (k) => { const v = await archive.get(k); try { |
