Module

x/rambda/files/index.d.ts>ifElseAsync

Faster and smaller alternative to Ramda
Latest
function ifElseAsync
import { ifElseAsync } from "https://dotland.deno.dev/x/rambda@9.4.1/files/index.d.ts";

Parameters

condition: (x: T) => Promise<boolean>
onTrue: (x: T) => U
onFalse: (x: T) => U

Returns

(x: T) => Promise<U>

Parameters

condition: (x: T) => boolean
onTrue: (x: T) => Promise<U>
onFalse: (x: T) => Promise<U>

Returns

(x: T) => Promise<U>

Parameters

condition: (x: T) => Promise<boolean>
onTrue: (x: T) => Promise<U>
onFalse: (x: T) => Promise<U>

Returns

(x: T) => Promise<U>

Parameters

condition: (x: T, y: K) => Promise<boolean>
onTrue: (x: T, y: K) => U
onFalse: (x: T, y: K) => U

Returns

(x: T, y: K) => Promise<U>

Parameters

condition: (x: T, y: K) => boolean
onTrue: (x: T, y: K) => Promise<U>
onFalse: (x: T, y: K) => Promise<U>

Returns

(x: T, y: K) => Promise<U>

Parameters

condition: (x: T, y: K) => Promise<boolean>
onTrue: (x: T, y: K) => Promise<U>
onFalse: (x: T, y: K) => Promise<U>

Returns

(x: T, y: K) => Promise<U>