Skip to main content
Module

x/domain_functions/src/composable/index.ts

Decouple your business logic from your framework. With first-class type inference from end to end.
Go to Latest
import * as domainFunctions from "https://deno.land/x/domain_functions@v2.6.0/src/composable/index.ts";

Functions

Creates a single function out of multiple Composables. It will pass the same input to each provided function. The functions will run in parallel. If all constituent functions are successful, The data field will be a tuple containing each function's output.

Receives a Record of Composables, runs them all in parallel and preserves the shape of this record for the data property in successful results.

Creates a composable function. That function is gonna catch any errors and always return a Result.

It takes a Composable and a predicate to apply a transformation over the resulting data. It only runs if the function was successfull. When the given function fails, its error is returned wihout changes.

Creates a new function that will apply a transformation over a resulting Failure from the given function. When the given function succeeds, its result is returned without changes.

Creates a single function out of a chain of multiple Composables. It will pass the output of a function as the next function's input in left-to-right order. The resulting data will be the output of the rightmost function.

Works like pipe but it will collect the output of every function in a tuple.

Turns the given 'unknown' error into an ErrorWithMessage.