Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / lodash / max.js
1 var baseExtremum = require('./internal/baseExtremum'),
2     gt = require('./gt'),
3     identity = require('./identity');
4
5 /**
6  * Computes the maximum value of `array`. If `array` is empty or falsey
7  * `undefined` is returned.
8  *
9  * @static
10  * @memberOf _
11  * @category Math
12  * @param {Array} array The array to iterate over.
13  * @returns {*} Returns the maximum value.
14  * @example
15  *
16  * _.max([4, 2, 8, 6]);
17  * // => 8
18  *
19  * _.max([]);
20  * // => undefined
21  */
22 function max(array) {
23   return (array && array.length)
24     ? baseExtremum(array, identity, gt)
25     : undefined;
26 }
27
28 module.exports = max;