varisSymbol=require('./isSymbol');/** * The base implementation of methods like `_.max` and `_.min` which accepts a * `comparator` to determine the extremum value. * * @private * @param {Array} array The array to iterate over. * @param {Function} iteratee The iteratee invoked per iteration. * @param {Function} comparator The comparator used to compare values. * @returns {*} Returns the extremum value. */functionbaseExtremum(array,iteratee,comparator){varindex=-1,length=array.length;while(++index<length){varvalue=array[index],current=iteratee(value);if(current!=null&&(computed===undefined?(current===current&&!isSymbol(current)):comparator(current,computed))){varcomputed=current,result=value;}}returnresult;}module.exports=baseExtremum;