{"version":3,"file":"max.cjs","names":[],"sources":["../../src/math/max.ts"],"sourcesContent":["/**\n * Computes the maximum value of array.\n * If array is empty or falsey, undefined is returned.\n *\n * @param numbers - The array of numbers to get the maximum from\n * @returns Returns the maximum value\n *\n * @example\n * max([1, 2, 3, 4]) // => 4\n * max([]) // => undefined\n * max([1.5, 2.5, 3]) // => 3\n */\nexport function max(numbers: number[]): number | undefined {\n  if (!Array.isArray(numbers) || numbers.length === 0) {\n    return undefined;\n  }\n\n  return Math.max(...numbers);\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,SAAgB,IAAI,SAAuC;CACzD,IAAI,CAAC,MAAM,QAAQ,OAAO,KAAK,QAAQ,WAAW,GAChD;CAGF,OAAO,KAAK,IAAI,GAAG,OAAO;AAC5B"}