MCPcopy
hub / github.com/axios/axios / invoke

Function invoke

lib/helpers/throttle.js:13–21  ·  view source on GitHub ↗
(args, now = Date.now())

Source from the content-addressed store, hash-verified

11 let timer;
12
13 const invoke = (args, now = Date.now()) => {
14 timestamp = now;
15 lastArgs = null;
16 if (timer) {
17 clearTimeout(timer);
18 timer = null;
19 }
20 fn(...args);
21 };
22
23 const throttled = (...args) => {
24 const now = Date.now();

Callers 2

throttledFunction · 0.85
flushFunction · 0.85

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected