vararrayMap=require('./_arrayMap'),baseIteratee=require('./_baseIteratee'),baseMap=require('./_baseMap'),baseSortBy=require('./_baseSortBy'),baseUnary=require('./_baseUnary'),compareMultiple=require('./_compareMultiple'),identity=require('./identity');/** * The base implementation of `_.orderBy` without param guards. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. * @param {string[]} orders The sort orders of `iteratees`. * @returns {Array} Returns the new sorted array. */functionbaseOrderBy(collection,iteratees,orders){varindex=-1;iteratees=arrayMap(iteratees.length?iteratees:[identity],baseUnary(baseIteratee));varresult=baseMap(collection,function(value,key,collection){varcriteria=arrayMap(iteratees,function(iteratee){returniteratee(value);});return{'criteria':criteria,'index':++index,'value':value};});returnbaseSortBy(result,function(object,other){returncompareMultiple(object,other,orders);});}module.exports=baseOrderBy;