Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/promise/index.ts

A JavaScript extension package for building strong and modern applications.
Latest
import * as ayonliJsext from "https://deno.land/x/ayonli_jsext@v0.9.72/promise/index.ts";

Functions for async/promise context handling.

Functions

Wraps an async iterable object with an abort signal.

Creates a new abort controller with a parent signal, the new abort signal will be aborted if the controller's abort method is called or when the parent signal is aborted, whichever happens first.

Resolves a promise only after the given duration.

Creates a promise that can be resolved or rejected manually.

Runs multiple tasks concurrently and returns the result of the first task that completes. The rest of the tasks will be aborted.

Blocks the context for a given duration.

Try to resolve a promise with a timeout limit.

Blocks the current routine until the test returns a truthy value, which is not false, null or undefined. If the test throws an error, it will be treated as a falsy value and the check continues.

Type Aliases

A promise that can be resolved or rejected manually.