
6 Lodash Modernizations
With the introduction of various collection helpers and new syntax in ES6 and more recent JavaScript versions, some Lodash functions have become somewhat redundant.
- Replace _.every with array.every
Replace Lodash
_.every
witharray.every
. - Replace _.filter with array.filter
Replace Lodash
_.filter
witharray.filter
. - Replace _.each and _.forEach with array.forEach
Replace Lodash
_.each
and_.forEach
witharray.forEach
. - Replace _.map with array.map
Replace Lodash
_.map
witharray.map
. - Replace _.noop with arrow Function
Replace
_.noop
with() => undefined
. - Replace _.some with array.some
Replace Lodash
_.some
witharray.some
.