X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2Fmax.js;fp=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2Fmax.js;h=124b33127dd159c70e0aed071205b5c6d7ac5f19;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/max.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/max.js new file mode 100644 index 000000000..124b33127 --- /dev/null +++ b/node_modules/grunt-legacy-log-utils/node_modules/lodash/max.js @@ -0,0 +1,28 @@ +var baseExtremum = require('./_baseExtremum'), + gt = require('./gt'), + identity = require('./identity'); + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey + * `undefined` is returned. + * + * @static + * @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, gt) + : undefined; +} + +module.exports = max;