Consider moving to use Lodash rather than Underscore
See original GitHub issueThere are several places Lodash has functions which Underscore doesn’t which could be used internally, and none the other way around.
E.g. the _.result
causing #25 would be _.get
in Lodash but Underscore has no equivalent.
Is there a possibility Underscore could be replaced?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Differences between Lodash and Underscore.js - Stack Overflow
I created Lodash to provide more consistent cross-environment iteration support for arrays, strings, objects, and arguments objects 1.
Read more >Underscore vs Lo-Dash - Herding Lions - Ben McCormick
Both Underscore and Lo-Dash blow away the native functional methods. With its latest versions Underscore has joined Lo-Dash in using loop based ...
Read more >Lodash and Underscore, is there still a case?
I se two big advantages to Lodash/Underscore other than providing slightly stricter FP semantics: They make your code more concise, usually in a ......
Read more >Difference between lodash and Underscore - GeeksforGeeks
Lodash has improved syntax for chaining functions. Underscore's chaining syntax are a bit heavy. ; Lodash is significantly larger than Underscore ...
Read more >Underscore -> lodash - core - Meteor forums
// Use lodash instead of underscore _ = lodash;. I did this in a large, complex app that relies heavily on a whole...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
^^^ I’m working under the assumption that the remaining lodash dependency size will be smaller than the bundle output by including underscore.
And for existing users, the nice feature here is the bundle internalizes the dependencies in a closure. So it only increases supported environments/sites. This also makes the bundle more immune to library version differences out in the wild.
I just built such a contraption @jdalton (thanks for chiming in, you always seem to hear lodash being uttered anywhere in the universe… It’s like your bat signal; have you ever called lodash your utility belt?)
… ok ok, i know i @ mentioned you
Thanks for the explanation @kofrasa … I’ll PR my webpack/babel script. Then do another PR removing the core of the obviated methods (like you mention
each
,keys
, etc.)