Lodash v3.0.0
41–50 of 82 posts
Re: Lodash v3.0.0
#42Already submitted: https://hn.algolia.com/?query=lodash&sort=byPopularity&prefi... Seems like no one cares. Strange.
I use Lodash but i see not point in this announcement in its current form - what changed exactly? [edit] Changelog is there https://github.com/lodash/lodash/wiki/Changelog Some decisions sound really weird, such as the fact that forEach is now lazy. It is not a standard replacement anymore, and probably break the compatibility for quite a few apps (even if I'm deeply convinced that we should all use the native functi…
Re: Lodash v3.0.0
#43Q: "What does it do?" A: "A utility library delivering consistency, modularity, performance, & extras." Q: "Yeah, but what does it do?" A: "Oh, nothing but it does it consistently, modularly and performant. We also have functions for string handling in the extras module."
It's extra stuff that should be in the standard library but isn't. These days, a lot of it is actually in the standard library - for example, array maps - and invoking lodash just calls the es5/es6 built in, with a slightly uglier syntax.
I think the most useful functions are the typechecking utilities (typeof in javascript is the most useless keyword the human kind engineered in a language).
In the end is a very nice library to work with when it does not get in the way (of course, if you are using `_.each([], fn)`, you should think again and use `Array#forEach` or a nice `for`)
Re: Lodash v3.0.0
#44That being said, I still can't believe we don't have a flatMap:
https://github.com/lodash/lodash/issues/812 https://github.com/jashkenas/underscore/issues/452 (Underscore repo, but still Mr. Dalton, author of Lodash, opposing.)
Re: Lodash v3.0.0
#45Q: "What does it do?" A: "A utility library delivering consistency, modularity, performance, & extras." Q: "Yeah, but what does it do?" A: "Oh, nothing but it does it consistently, modularly and performant. We also have functions for string handling in the extras module."
It's extra stuff that should be in the standard library but isn't. These days, a lot of it is actually in the standard library - for example, array maps - and invoking lodash just calls the es5/es6 built in, with a slightly uglier syntax.
Re: Lodash v3.0.0
#46Earlier quoted context omitted.
Lazy.js claims to be even faster than both with support for lazy evaluation to boot. Not quite a drop-in replacement like lodash is, but I think it only requires a minor tweak.
A new feature in 3.0 is that lodash now supports lazy evaluation using the chaining API from 2.x.
Re: Lodash v3.0.0
#47Earlier quoted context omitted.
Thanks - it sounds as if you could use it as a drop in replacement for underscore.
Yes, you can. I've successfully done so in a Backbone/React app. The _.chain() method furthermore gives a nice functional style ways of building lists which is useful when building UI in React, like so: var list = _.chain([1, 2, 3, 4, 5]) .filter(function (value) { return value > 2; }) .map(function (value) { return value; }); console.log(list); // prints: // [3, 4, 5]
Also your code was broken in Lodash 2 (it'd return a lodash object, not a list) and is more broken in Lodash 3 (chains are now lazy), so your code does just about nothing until you force the iterator's evaluation)
Re: Lodash v3.0.0
#48Q: "What does it do?" A: "A utility library delivering consistency, modularity, performance, & extras." Q: "Yeah, but what does it do?" A: "Oh, nothing but it does it consistently, modularly and performant. We also have functions for string handling in the extras module."
It's extra stuff that should be in the standard library but isn't. These days, a lot of it is actually in the standard library - for example, array maps - and invoking lodash just calls the es5/es6 built in, with a slightly uglier syntax.
Re: Lodash v3.0.0
#49Really nice to see that there's now an auto-curried, function-first version, lodash-fp! I've been really attracted by Ramda JS recently for this reason. https://www.npmjs.com/package/lodash-fp
I've been looking for some real-world examples of how currying might be useful in javascript. Haven't not used a language which supports currying for any real world project, I'm interested to know how it can help. I found a page [1] which talks about currying in javascript, then says "Are there practical uses for currying in JavaScript? Not really." Can you point me at anything which will help me see why it's useful?…
Re: Lodash v3.0.0
#50See release notes and changelog: - https://github.com/lodash/lodash/releases/tag/3.0.0 - https://github.com/lodash/lodash/wiki/Changelog