TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lodash v3.0.0

245 pointsby gitspiritover 10 years ago

18 comments

astalwickover 10 years ago
We switched from underscore to lodash several months ago, and haven't regretted it. The fact that lodash follows semver is huge. Underscore has introduced serious breaking changes in minor point-releases more than once, which is completely unacceptable for a utility library.
评论 #8952914 未加载
allendoerferover 10 years ago
<p><pre><code> The lodash &amp; lodash-compat npm packages now come with modules baked in too. Perfect for Browserify! &#x2F;&#x2F; load the modern build var _ = require(&#x27;lodash&#x27;); &#x2F;&#x2F; or a method category var array = require(&#x27;lodash&#x2F;array&#x27;); &#x2F;&#x2F; or a method var chunk = require(&#x27;lodash&#x2F;array&#x2F;chunk&#x27;); </code></pre> This is great. It combines trust and quality with modularity.
tobrover 10 years ago
Really nice to see that there&#x27;s now an auto-curried, function-first version, lodash-fp! I&#x27;ve been really attracted by Ramda JS recently for this reason.<p><a href="https://www.npmjs.com/package/lodash-fp" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;lodash-fp</a>
评论 #8952532 未加载
olivierkaisinover 10 years ago
See release notes and changelog: - <a href="https://github.com/lodash/lodash/releases/tag/3.0.0" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lodash&#x2F;lodash&#x2F;releases&#x2F;tag&#x2F;3.0.0</a> - <a href="https://github.com/lodash/lodash/wiki/Changelog" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lodash&#x2F;lodash&#x2F;wiki&#x2F;Changelog</a>
评论 #8953678 未加载
评论 #8952495 未加载
Sarienover 10 years ago
Q: &quot;What does it do?&quot;<p>A: &quot;A utility library delivering consistency, modularity, performance, &amp; extras.&quot;<p>Q: &quot;Yeah, but what does it do?&quot;<p>A: &quot;Oh, nothing but it does it consistently, modularly and performant. We also have functions for string handling in the extras module.&quot;
评论 #8953059 未加载
评论 #8953101 未加载
Elracover 10 years ago
I followed the link and saw &quot;lodash&quot; for the first time today. Oh, it&#x27;s a library! With an API! In various formats!<p>I always appreciate it when the top of the project page provides a one-liner explaining just what it is I&#x27;m looking at.
评论 #8952946 未加载
评论 #8952875 未加载
评论 #8953055 未加载
评论 #8956080 未加载
acjohnson55over 10 years ago
Lodash is an incredible accomplishment, and having it vastly improves the Javascript authorship process over the standard library.<p>That being said, I still can&#x27;t believe we don&#x27;t have a flatMap:<p><a href="https://github.com/lodash/lodash/issues/812" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lodash&#x2F;lodash&#x2F;issues&#x2F;812</a> <a href="https://github.com/jashkenas/underscore/issues/452" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jashkenas&#x2F;underscore&#x2F;issues&#x2F;452</a> (Underscore repo, but still Mr. Dalton, author of Lodash, opposing.)
评论 #8955039 未加载
urzaover 10 years ago
It is alternative to underscore.js? Or extensions for underscore.js? Not clear from the page...
评论 #8952638 未加载
sgroveover 10 years ago
I&#x27;ve been playing around with getting Mori[0] more js-like, from more idiomatic function names and argument order (fn as the last argument, released) to playing around with a chaining API. Ideally we should be able to wrap javascript values, manipulate via idiomatic chaining (similar to Lodash), while getting most of the benefits from highly-tuned persistent data structures, lazy sequences, etc.<p>e.g.<p><pre><code> expect(_([1,1,1,1,2,2,3,4,5,6,6]).distinct().conj(7).out()).toEqual([1,2,3,4,5,6,7]); </code></pre> Here&#x27;s a small set of specs showing early ideas <a href="https://github.com/swannodette/mori/blob/8e82b15b35b2989d4a2d5d74c6a23f5bf779ea2f/spec/chain-spec.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;swannodette&#x2F;mori&#x2F;blob&#x2F;8e82b15b35b2989d4a2...</a><p>[0] <a href="https://github.com/swannodette/mori" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;swannodette&#x2F;mori</a>
andrezsanchezover 10 years ago
I&#x27;ve tended to avoid both underscore and lodash because they&#x27;re both in the slew of monolithic pre-npm libraries, however the lazy evaluation looks interesting. I wouldn&#x27;t be surprised to find a library that handles lazy eval without all the extra features Lodash brings.
评论 #8955374 未加载
评论 #8955468 未加载
评论 #8955407 未加载
评论 #8956055 未加载
jtheoryover 10 years ago
Whoah: &quot;Tested in Chrome 39-40, Firefox 34-35, <i>IE 6-11</i>, Opera 25-26, Safari 5-8&quot;...<p>IE6+ support! I wonder if that&#x27;s real, full support, or more like a &quot;there are serious bugs we&#x27;ll probably never fix for old IE&quot;.<p>Working with old IE versions is loathsome (but still required for some of us), so libraries that just work there are much appreciated.
评论 #8955011 未加载
edwardgover 10 years ago
For anyone interested in learning more about lodash, Adam Boduch&#x27;s &quot;Lodash Essentials&quot; book just got released, and covers everything in v3 (he delayed it to make sure it covered v3).<p><a href="https://www.packtpub.com/web-development/lo-dash-essentials" rel="nofollow">https:&#x2F;&#x2F;www.packtpub.com&#x2F;web-development&#x2F;lo-dash-essentials</a>
ecaronover 10 years ago
The changelog at <a href="https://github.com/lodash/lodash/wiki/Changelog" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lodash&#x2F;lodash&#x2F;wiki&#x2F;Changelog</a> gives some nice examples of breaking changes for anyone moving from v2.x
sosukeover 10 years ago
So going modern means breaking in PhantomJS, that is a bummer.
评论 #8956038 未加载
tieTYTover 10 years ago
It&#x27;s not clear to me: Is that list at the bottom new things in v.3?
picardoover 10 years ago
Is there build of this that lets me require a single function?
评论 #8965203 未加载
facepalmover 10 years ago
Is this the same as underscore.js?
评论 #8952616 未加载
mackwicover 10 years ago
Already submitted: <a href="https://hn.algolia.com/?query=lodash&amp;sort=byPopularity&amp;prefix&amp;page=0&amp;dateRange=last24h&amp;type=story" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=lodash&amp;sort=byPopularity&amp;prefi...</a><p>Seems like no one cares. Strange.
评论 #8952474 未加载
评论 #8952477 未加载