js-util

Home > rc-js-util > fpValueOrNull

fpValueOrNull() function

Returns the value if the predicate is true, else null.

Signature:

export declare function fpValueOrNull<TValue>(predicate: boolean, value: TValue): TValue | null;

Parameters

Parameter Type Description
predicate boolean  
value TValue  

Returns:

TValue | null

Remarks

See fpValueOrNull().