Sha256: f3709e05a0c0efb2e08bef63ed00b2e42e19efcbc129c1da6ada25a7425d03ad
Contents?: true
Size: 577 Bytes
Versions: 14
Compression:
Stored size: 577 Bytes
Contents
/** Used as references for `-Infinity` and `Infinity`. */ var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY; /** * A specialized version of `_.max` for arrays without support for iteratees. * * @private * @param {Array} array The array to iterate over. * @returns {*} Returns the maximum value. */ function arrayMax(array) { var index = -1, length = array.length, result = NEGATIVE_INFINITY; while (++index < length) { var value = array[index]; if (value > result) { result = value; } } return result; } module.exports = arrayMax;
Version data entries
14 entries across 7 versions & 1 rubygems