UNPKG

hkt-toolbelt

Version:

Functional and composable type utilities

20 lines (19 loc) 509 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isLessThanOrEqual = void 0; /** * Given two numbers, return whether the second number is less than or equal * to the first. * * @param {number} a - The first number. * @param {number} b - The second number. * * @example * ```ts * import { NaturalNumber } from "hkt-toolbelt"; * * const result = NaturalNumber.isLessThanOrEqual(3)(2) * // ^? true * ``` */ exports.isLessThanOrEqual = ((a) => (b) => b <= a);