nhb-toolbox
Version:
A versatile collection of smart, efficient, and reusable utility functions and classes for everyday development needs.
44 lines • 1.47 kB
TypeScript
/**
* * Check if a number is even or not.
*
* @param input The number to check.
* @returns Boolean: `true` if even and `false` if not even.
*/
export declare const isEven: (input: number) => boolean;
/**
* * Checks if a number is odd or not.
*
* @param input The number to check.
* @returns Boolean: `true` if odd and `false` if not odd.
*/
export declare const isOdd: (input: number) => boolean;
/**
* * Checks if a number is a multiple of another number.
*
* @param input - The number to check.
* @param multipleOf - The number to check against.
* @returns `true` if `input` is a multiple of `multipleOf`, otherwise `false`.
*/
export declare const isMultiple: (input: number, multipleOf: number) => boolean;
/**
* * Checks if a number is a perfect square.
*
* @param num The number to check.
* @returns `true` if the number is a perfect square, otherwise `false`.
*/
export declare function isPerfectSquare(num: number): boolean;
/**
* * Checks if a number is part of the Fibonacci sequence.
*
* @param num The number to check.
* @returns `true` if the number is a Fibonacci number, otherwise `false`.
*/
export declare function isFibonacci(num: number): boolean;
/**
* * Checks whether any input is not a finite number.
*
* @param numbers - The list of numbers to validate.
* @returns `true` if any input is not finite.
*/
export declare function areInvalidNumbers(...numbers: number[]): boolean;
//# sourceMappingURL=guards.d.ts.map