Do not use `update` in map if iteratee is a function

Performance bump, especially while curry is slow.
main
Aaron Jensen 2015-08-09 23:36:34 -07:00
parent 5c64c7fbf6
commit 167760fb24
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,10 @@ function clone(object) {
}
function map(iteratee, object) {
const updater = update(iteratee);
const updater = typeof iteratee === 'function' ?
iteratee :
update(iteratee);
let newObject;
forEach(object, (value, index) => {