MCPcopy Create free account
hub / github.com/tinyplex/tinybase / [Symbol.asyncIterator]

Function [Symbol.asyncIterator]

test/unit/persisters/common/databases.ts:157–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155 },
156 onChange: ({signal} = {}) => ({
157 async *[Symbol.asyncIterator]() {
158 signal?.addEventListener('abort', noop);
159 while (!signal?.aborted) {
160 const nextChange = await new Promise<WatchOnChangeEvent>(
161 (resolve) => {
162 const observer = (_1: any, _2: any, tableName: string) => {
163 resolve({changedTables: [tableName]});
164 };
165 sqlite3.update_hook(db, observer);
166 },
167 );
168 yield nextChange;
169 }
170 },
171 }),
172 };
173};

Callers

nothing calls this directly

Calls 1

addEventListenerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…