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

x/froebel/function.ts

A strictly typed utility library.
Go to Latest
import * as froebel from "https://deno.land/x/froebel@v0.21.3/function.ts";

Variables

Like pipe but takes an argument as its first parameter and invokes the pipe with it.

Same as nullishChain but accept asynchronous functions too.

Given a list of functions that accept the same parameters, returns a function that takes these parameters and invokes all of the given functions.

Same as bundle, but return synchronously.

Take a list of functions that accept the same parameters and call them all with the provided arguments.

Creates a debounced function that delays invoking fun until ms milliseconds have passed since the last invocation of the debounced function.

Given a function and its nth..last arguments, return a function accepting arguments 0..n-1.

Identity function.

Returns a version of the function fun that can only be invoked limit times. An optional except function will be called with the same parameters on any additional invocations.

Returns a copy of fun that remembers its result for any given arguments and only invokes fun for unknown arguments.

Given a list of functions that accept the same parameters, returns a function that given these arguments returns the result of the first function whose result is not nullish.

Special case of limitInvocations. fun can only be invoked once.

Partially apply a function.

Given a list of functions returns a function that will execute the given functions one after another, always passing the result of the previous function as an argument to the next function.

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