- Underscore
_.anyis Lodash_.some - Underscore
_.composeis Lodash_.flowRight - Underscore
_.containsis Lodash_.includes - Underscore
_.eachdoesn’t allow exiting by returningfalse - Underscore
_.findWhereis Lodash_.find - Underscore
_.flattenis deep by default while Lodash is shallow - Underscore
_.indexByis Lodash_.keyBy - Underscore
_.invokeis Lodash_.invokeMap - Underscore
_.mapObjectis Lodash_.mapValues - Underscore
_.maxcombines Lodash_.max&_.maxBy - Underscore
_.mincombines Lodash_.min&_.minBy - Underscore
_.objectis Lodash_.zipObject - Underscore
_.pairsis Lodash_.toPairs - Underscore
_.pluckis Lodash_.map - Underscore
_.uniqby aniterateeis Lodash_.uniqBy - Underscore
_.whereis Lodash_.filter - Underscore
_.isFinitedoesn’t align withNumber.isFinite(e.g._.isFinite('1')returnstruein Underscore butfalsein Lodash) - Underscore
_.matchesshorthand doesn’t support deep comparisons (e.g._.filter(objects, { 'a': { 'b': 'c' } })) - Underscore ≥ 1.7 & Lodash
_.templatesyntax is_.template(string, option)(data) - Lodash
_.memoizecaches areMaplike objects - Lodash supports implicit chaining, lazy chaining, & shortcut fusion
- Lodash split its overloaded
_.head,_.last,_.rest, &_.initialout into_.take,_.takeRight,_.drop, &_.dropRight(i.e._.head(array, 2)in Underscore is_.take(array, 2)in Lodash)
Last active
January 6, 2018 05:26
-
-
Save tiggerk/12c0360fe49f6f0330aff7712d1d57c5 to your computer and use it in GitHub Desktop.
Migrating to loadsh from Underscore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment