Skip to main content
Module

x/live/utils/async.ts>throttle

Git-based Visual CMS for Deno, </> htmx and Tailwind apps. Deploy on any Deno-compatible host.
Very Popular
Go to Latest
variable throttle
import { throttle } from "https://deno.land/x/live@1.100.1/utils/async.ts";

Allow one concurrent cb to be running.

If cb is called again while it is running, it will be queued and run after the current cb is done. If there are already any cb queued, these queued cb will be ignored and only the last cb will be run.

type

(cb: () => Promise<void>) => unknown