Home > rc-js-util > _Fp
Utilities for functional programming.
Signature:
export declare class _Fp
Property | Modifiers | Type | Description |
---|---|---|---|
debounce | static |
typeof fpDebounce | Creates a function that will proxy calls to functionToProxy when wait time has passed since the last call, using the most recent arguments. Where immediate is true, the function immediately proxies the call and will not proxy again until wait time passes since the last call. |
identity | static |
typeof fpIdentity | Returns the argument. |
maybeNewValue | static |
typeof fpMaybeNewValue | Returns the newValue if defined, else the old value. |
noOp | static |
typeof fpNoOp | Does nothing (intentionally…). |
normalizeToNull | static |
typeof fpNormalizeToNull | Normalizes undefined input to null . |
normalizeToUndefined | static |
typeof fpNormalizeToUndefined | Normalizes null input to undefined . |
once | static |
typeof fpOnce | Creates a function that can be called many times but will run at most once. |
valueOrNull | static |
typeof fpValueOrNull | Returns the value if the predicate is true, else null. |