UNPKG

@web3r/flowerkit

Version:

Tree-shakable JavaScript and TypeScript utility library for frontend/browser apps: DOM, events, arrays, objects, strings, date, JSON, and network helpers (ESM/CJS, SSR-friendly).

15 lines (14 loc) 591 B
export type TGetMinFromArrArgs = Parameters<typeof getMinFromArr>; export type TGetMinFromArrReturn = ReturnType<typeof getMinFromArr>; /** * Gets min number from an array of numbers * @param {number[]} arr Source array of numbers (must be non-empty) * @returns {number} Minimum value * @throws {TypeError} getMinFromArr: expected a non-empty array of numbers * @example * // How to get min number from Array of numbers? * const arr = [ 100, 200, 300 ]; * const min = getMinFromArr(arr); * console.log(min); // 100 */ export declare const getMinFromArr: (arr: number[]) => number;