MCPcopy Create free account
hub / github.com/braposo/react-text-loop / loop

Function loop

src/utils.ts:63–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61 const handle: Handle = { value: 0 };
62
63 function loop(): number | void {
64 const current = new Date().getTime();
65
66 const delta = current - start;
67
68 if (delta >= delay) {
69 fn.call(null);
70 } else {
71 handle.value = requestAnimFrame(loop);
72 }
73 }
74
75 handle.value = requestAnimFrame(loop);
76 return handle;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…