defaultTo
defaultTo<
B>(fallback): <A>(a) =>B|NonNullable<A>
Defined in: Composition/fn.ts:113
Returns a fallback value if the input is null or undefined; otherwise returns the input value. Highly useful as a data-last default value step inside pipelines.
Type Parameters
Section titled “Type Parameters”B
Parameters
Section titled “Parameters”fallback
Section titled “fallback”B
Returns
Section titled “Returns”<A>(a) => B | NonNullable<A>