question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider moving to use Lodash rather than Underscore

See original GitHub issue

There 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
justsmlcommented, Sep 18, 2016

^^^ 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.

1reaction
justsmlcommented, Sep 18, 2016

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.)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found