/** * A unary function that returns true or false for a given `value`. * * @since v0.1.2 */ export type Predicate = (value: T) => boolean; /** * A type predicate. Returns `true` if a given `value` is `boolean`. * * @since v0.10.0 */ export declare function isBoolean(value: unknown): value is boolean; /** * A type predicate. Returns `true` if a given `value` is not `boolean`. * * @since v0.10.0 */ export declare function isNotBoolean(value: T | boolean): value is T; /** * Returns true when the value is neither undefined, null, false, NaN, 0, -0, 0n (a `BigInt` zero), * "" (an empty string), or the `document.all` builtin. * * @see https://developer.mozilla.org/en-US/docs/Glossary/Truthy * * @since v0.3.0 */ export declare function isTruthy(value: unknown): boolean; /** * Returns true when the value is undefined, null, false, NaN, 0, -0, 0n (a `BigInt` zero), "" (an empty string), * or the `document.all` builtin. * * @see https://developer.mozilla.org/en-US/docs/Glossary/Falsy * * @since v0.3.0 */ export declare function isFalsy(value: unknown): boolean; /** * Creates a {@linkcode Predicate} that is true if its argument strictly equals a given `input`. * * @since v0.2.0 */ export declare function is(input: T): Predicate; /** * Creates a {@linkcode Predicate} that is true if its argument does not equal a given `input`. * * @since v0.2.0 */ export declare function isNot(input: T): Predicate; /** * Creates a {@linkcode Predicate} that inverses the result of a given {@linkcode Predicate}. * * @since v0.2.0 */ export declare function not(predicate: Predicate): Predicate; /** * Creates a {@linkcode Predicate} that is true when all given `predicates` are true. * * This is a logical `AND` operation. * * @since v0.2.0 */ export declare function all(...predicates: Predicate[]): Predicate; /** * Creates a {@linkcode Predicate} that is true when at least one of given `predicates` is true. * * This is a logical `OR` operation. * * @since v0.2.0 */ export declare function either(...predicates: Predicate[]): Predicate; /** * Creates a {@linkcode Predicate} that is true when none of given `predicates` is true. * * @since v0.2.0 */ export declare function neither(...predicates: Predicate[]): Predicate; /** * Creates a {@linkcode Predicate} that is true * when at least a given `minimum` number of given `predicates` is true. * * @since v0.2.0 */ export declare function atLeast(minimum: number, ...predicates: Predicate[]): Predicate; /** * Creates a {@linkcode Predicate} that is true * when no more than a given `maximum` number of given `predicates` is true. * * @since v0.2.0 */ export declare function atMost(maximum: number, ...predicates: Predicate[]): Predicate; /** * Creates a {@linkcode Predicate} that is true * when exactly a given `count` of given `predicates` is true. * * @since v0.2.0 */ export declare function exactly(count: number, ...predicates: Predicate[]): Predicate;