Skip to main content
Module

x/911/src/promises.ts

Opinionated collection of helper tools. Assembled with Deno in mind.
Go to Latest
import * as 911 from "https://deno.land/x/911@0.1.1/src/promises.ts";

Classes

Create a promise pool for controlled execution of promises.

Functions

Return a Promise with resolve and reject methods

Create a promise lock

Create singleton promise function

Debounce execution of a function. Debouncing, unlike throttling, guarantees that a function is only executed a single time, either at the very beginning of a series of calls, or at the very end.

f
p

Utility for managing multiple promises.

Promised setTimeout

Throttle execution of a function. Especially useful for rate limiting execution of handlers on events like resize and scroll.

Interfaces

Promise with resolve and reject methods of itself