{"version":"1.0","type":"rich","title":"Gist 1da8b314a37ae4872e574b7a584068c5","description":"This visualization demonstrates a rate-limiting mechanism that controls how often a function can execute. The code defines a `rateLimit` function that maintains a queue of pending calls, decrements an available-call counter with each invocation, and schedules re-incrementing that counter after a specified interval. When the counter reaches zero, subsequent calls are queued in a FIFO array until slots free up. The implementation relies on plain JavaScript with `setTimeout` for timing and uses a closure to preserve state across calls, showing how to throttle asynchronous operations without external libraries.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-1da8b314a37ae4872e574b7a584068c5?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}