MCPcopy Index your code
hub / github.com/developit/htm / done

Function done

test/__d8.mjs:32–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 await new Promise(resolve => {
31 let calls = 0;
32 const done = () => {
33 if (calls++) throw Error(`Callback called multiple times\n\t${name}`);
34 log('INFO', `✅ ${name}`);
35 resolve();
36 };
37 Promise.resolve(done)
38 .then(fn)
39 .then(() => calls || done())

Callers 1

testFunction · 0.85

Calls 1

logFunction · 0.85

Tested by 1

testFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…