MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / throttle

Function throttle

static/js/utils.js:584–593  ·  view source on GitHub ↗
(func, limit)

Source from the content-addressed store, hash-verified

582}
583
584function throttle(func, limit) {
585 let inThrottle;
586 return function executedFunction(...args) {
587 if (!inThrottle) {
588 func(...args);
589 inThrottle = true;
590 setTimeout(() => inThrottle = false, limit);
591 }
592 };
593}
594
595// ============================================
596// 格式化工具

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected