UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

70 lines (33 loc) 844 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [fpValueOrNull](./rc-js-util.fpvalueornull.md) ## fpValueOrNull() function Returns the value if the predicate is true, else null. **Signature:** ```typescript export declare function fpValueOrNull<TValue>(predicate: boolean, value: TValue): TValue | null; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> predicate </td><td> boolean </td><td> </td></tr> <tr><td> value </td><td> TValue </td><td> </td></tr> </tbody></table> **Returns:** TValue \| null ## Remarks See [fpValueOrNull()](./rc-js-util.fpvalueornull.md)<!-- -->.