deno.land / x / lodash@4.17.19 / npm-package / max.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var baseExtremum = require('./_baseExtremum'), baseGt = require('./_baseGt'), identity = require('./identity');
/** * Computes the maximum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static * @since 0.1.0 * @memberOf _ * @category Math * @param {Array} array The array to iterate over. * @returns {*} Returns the maximum value. * @example * * _.max([4, 2, 8, 6]); * // => 8 * * _.max([]); * // => undefined */function max(array) { return (array && array.length) ? baseExtremum(array, identity, baseGt) : undefined;}
module.exports = max;
lodash

Version Info

Tagged at
3 years ago

External Dependencies

No external dependencies 🎉