nhb-toolbox
Version:
A versatile collection of smart, efficient, and reusable utility functions and classes for everyday development needs.
31 lines • 1.22 kB
TypeScript
/**
* Apply multiples of a number if there is any.
* @param array Array of numbers to apply the condition on.
* @param multiples The multiples of which number.
* @returns Array of multiples of the desired number
*/
export declare const _applyMultiples: (array: number[], multiples?: number) => number[];
/**
* - Converts a number less than 1000 to words.
* @param num - The number to convert (less than 1000).
* @param isLast - Whether this is the last group (thousands, millions, etc.).
* @returns Numbers less than 1000 in words.
*/
export declare function _convertLessThanThousand(num: number, isLast: boolean): string;
/**
* * Calculate the HCF (Highest Common Factor) of two numbers using the Euclidean algorithm.
*
* @param a - First number.
* @param b - Second number.
* @returns The HCF of the two numbers.
*/
export declare const _find2NumbersHCF: (a: number, b: number) => number;
/**
* * Calculate the LCM (Least Common Multiple) of two numbers using the Euclidean algorithm.
*
* @param a - First number.
* @param b - Second number.
* @returns The LCM of the two numbers.
*/
export declare const _find2NumbersLCM: (a: number, b: number) => number;
//# sourceMappingURL=helpers.d.ts.map