MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / iifunc

Function iifunc

packages/@stdlib/misc/src/utils.ts:77–82  ·  view source on GitHub ↗
(condition: any, a: A, b?: B)

Source from the content-addressed store, hash-verified

75}
76
77export function iifunc<
78 A extends (...args: any) => any,
79 B extends (...args: any) => any = () => undefined,
80>(condition: any, a: A, b?: B): ReturnType<A> | ReturnType<B> {
81 return condition ? a() : b?.();
82}

Callers

nothing calls this directly

Calls 1

bFunction · 0.85

Tested by

no test coverage detected