Do not use update
in map if iteratee is a function
Performance bump, especially while curry is slow.
This commit is contained in:
parent
5c64c7fbf6
commit
167760fb24
@ -18,7 +18,10 @@ function clone(object) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function map(iteratee, object) {
|
function map(iteratee, object) {
|
||||||
const updater = update(iteratee);
|
const updater = typeof iteratee === 'function' ?
|
||||||
|
iteratee :
|
||||||
|
update(iteratee);
|
||||||
|
|
||||||
let newObject;
|
let newObject;
|
||||||
|
|
||||||
forEach(object, (value, index) => {
|
forEach(object, (value, index) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user