MCPcopy Create free account
hub / github.com/denoland/std / done

Function done

async/unstable_throttle.ts:121–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119 const start = Date.now();
120 let result: unknown;
121 const done = () => {
122 throttlingAsync = false;
123 lastExecution = Date.now();
124 if (typeof timeframe === "function") {
125 tf = timeframe(lastExecution - start);
126 }
127 };
128 try {
129 clearTimeout(timeout);
130 result = fn.call(throttled, ...args);

Callers 1

throttleFunction · 0.70

Calls 1

nowMethod · 0.80

Tested by

no test coverage detected