Skip to main content
Module

x/froebel/function.ts>throttle

A strictly typed utility library.
Go to Latest
variable throttle
import { throttle } from "https://deno.land/x/froebel@v0.20.0/function.ts";

Create a throttled function that invokes fun at most every ms milliseconds.

fun is invoked with the last arguments passed to the throttled function.

Calling [throttle.cancel]() on the throttled function will cancel the currently scheduled invocation.