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

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

Faster and smaller alternative to Ramda
Go to Latest
function ifElseAsync
import { ifElseAsync } from "https://deno.land/x/rambda@v8.6.0/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>