MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / each

Method each

src/lib/FileSystemStorage.ts:123–130  ·  view source on GitHub ↗
(callback: (key: string, value: unknown) => unknown)

Source from the content-addressed store, hash-verified

121 }
122
123 async each(callback: (key: string, value: unknown) => unknown): Promise<unknown[]> {
124 const all = await this.getAll();
125 const results: unknown[] = [];
126 for (const [key, value] of Object.entries(all)) {
127 results.push(await callback(key, value));
128 }
129 return results;
130 }
131
132 async clear(): Promise<void> {
133 await this.sendRequest('monogatari:storage-clear', {});

Callers

nothing calls this directly

Calls 1

getAllMethod · 0.95

Tested by

no test coverage detected