Bump to v4.0.0.

This commit is contained in:
John-David Dalton
2015-12-16 17:53:20 -08:00
parent 94d714007e
commit 8c26e6fd4c
656 changed files with 16423 additions and 11602 deletions

30
max.js Normal file
View File

@@ -0,0 +1,30 @@
define(['./internal/baseExtremum', './gt', './identity'], function(baseExtremum, gt, identity) {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/**
* 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;
}
return max;
});