Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to lodash from underscore #38

Open
gabrielmontagne opened this issue Feb 7, 2017 · 1 comment
Open

Migrate to lodash from underscore #38

gabrielmontagne opened this issue Feb 7, 2017 · 1 comment

Comments

@gabrielmontagne
Copy link
Contributor

... little and big things diverge.
From the lodash guy,

Underscore has inconsistent support for arrays, strings, objects, and arguments objects. In newer browsers, Underscore methods ignore holes in arrays, "Objects" methods iterate arguments objects, strings are treated as array-like, and methods correctly iterate functions (ignoring their "prototype" property) and objects (iterating shadowed properties like "toString" and "valueOf"), while in older browsers they will not. Also, Underscore methods like _.clone preserve holes in arrays, while others like _.flatten don't. on stack overflow

I, today, bumped into a problem with memoize where if you use object keys underscore gets confused but not lodash. I imagine an [object Object] string under the hood.

@mstade
Copy link
Member

mstade commented Feb 7, 2017

Additionally, I believe I read somewhere that lodash is more amenable to static analysis and thus optimizations like inlining (since you're using rollup anyway) might be applied more successfully. I'll see if I can find a minute to dig up a source for this claim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants