MCPcopy Create free account
hub / github.com/EvoMap/evolver / waitFor

Function waitFor

test/proxyTraceIntegration.test.js:49–56  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

47}
48
49async function waitFor(fn) {
50 const deadline = Date.now() + 1000;
51 while (Date.now() < deadline) {
52 if (fn()) return true;
53 await new Promise((resolve) => setTimeout(resolve, 10));
54 }
55 return fn();
56}
57
58function encryptedTrace(ciphertext) {
59 return {

Callers 1

Calls 1

fnFunction · 0.70

Tested by

no test coverage detected