greaterThan
The greaterThan() method checks whether a number is strictly greater (>) than a given threshold. It can be used in a curried way to ease functional composition.
Interactive example
Syntax
Classic signature
typescript
function greaterThan<
GenericInput extends number
>(
input: GenericInput,
threshold: number
): booleanCurried signature
typescript
function greaterThan<
GenericInput extends number
>(
threshold: number
): (input: GenericInput) => booleanParameters
input: The number to compare (classic signature only).threshold: The comparison threshold.
Return value
returns true if the value is strictly greater than the threshold, false otherwise.
See also
greater- Checks whether a number is greater than or equal (>=)less- Checks whether a number is less than or equal (<=)lessThan- Checks whether a number is strictly less (<)
