mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Complete identity removal module. (#2993)
This commit is contained in:
committed by
John-David Dalton
parent
39931f9eaa
commit
d460c42230
@@ -2,7 +2,6 @@ import arrayMap from './arrayMap.js'
|
||||
import baseMap from './baseMap.js'
|
||||
import baseSortBy from './baseSortBy.js'
|
||||
import compareMultiple from './compareMultiple.js'
|
||||
import identity from '../identity.js'
|
||||
|
||||
/**
|
||||
* The base implementation of `orderBy` without param guards.
|
||||
@@ -15,7 +14,7 @@ import identity from '../identity.js'
|
||||
*/
|
||||
function baseOrderBy(collection, iteratees, orders) {
|
||||
let index = -1
|
||||
iteratees = iteratees.length ? iteratees : [identity]
|
||||
iteratees = iteratees.length ? iteratees : [value => value]
|
||||
|
||||
const result = baseMap(collection, (value, key, collection) => {
|
||||
const criteria = arrayMap(iteratees, iteratee => iteratee(value))
|
||||
|
||||
Reference in New Issue
Block a user