Migrate to lodash from underscore
Opened this issue · 1 comments
... 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.
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.