Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jdd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
jdd
11y ago
You use something like lodash from the start so you know out of the gate you're getting something modular, consistent, feature rich, that also happens to perform well. Using a library like lodash gives wiggle room between you and the l
62.
▲
by
jdd
11y ago
lodash has ~200 modular methods. That means it covers much more ground than the handful of ES5/6 built-ins provided and because it's modular you can use what you need without the stuff you don't.
63.
▲
by
jdd
11y ago
There's a flavor of lodash with auto-curried iteratee-first data-last methods too. See lodash-fp – https://www.npmjs.com/package/lodash-fp
64.
▲
by
jdd
11y ago
Why not both? lodash is modular so you can use the bits you need. There's also a flavor with auto-curried iteratee-first/data-last methods too https://www.npmjs.com/package/lodash-fp
65.
▲
by
jdd
11y ago
Yep. There's a package with the method transformations already applied – https://www.npmjs.com/package/lodash-fp
66.
▲
by
jdd
11y ago
lodash-fp is a thin layer over lodash enabling auto-curried, data last methods – https://www.npmjs.com/package/lodash-fp
67.
▲
by
jdd
11y ago
Naw, usage wise, on npm Ramda is about 0.003% of Lodash and its daily downloads are even less.
68.
▲
by
jdd
11y ago
lodash is consistency and compatibility first.
69.
▲
by
jdd
11y ago
For those that dig a more fp-style (auto-curried, iteratee first methods) and are used to lodash there's lodash-fp — https://www.npmjs.com/package/lodash-fp
70.
▲
by
jdd
12y ago
Open an issue ( https://github.com/lodash/lodash-fp/issues ) for the options you'd like and we'll add alternative API to cover the arguments required. lodash-fp does this for max, min, & uniq by offeri
71.
▲
by
jdd
12y ago
lodash v3 ( https://github.com/lodash/lodash/releases/tag/3.0.0 ) introduced lodash-fp for auto-curried iteratee-first lodash methods. See https://www.npmjs.com/package/lodash-fp .
72.
▲
by
jdd
12y ago
Yap, lodash v3 ( https://github.com/lodash/lodash/releases/tag/3.0.0 ) introduced lodash-fp for auto-curried iteratee-first lodash methods.
73.
▲
by
jdd
12y ago
For an example of cherry-picking lodash modules see https://github.com/postaljs/postal.js/issues/91#issuecomment... .
74.
▲
by
jdd
12y ago
Chaining is deferred until `value()` is implicitly or explicitly called. However shortcut fusion does not apply to `forEach`.
75.
▲
by
jdd
12y ago
lol, added "JavaScript" to the description :)
76.
▲
by
jdd
12y ago
lodash offers features and performance over es5/6 built-ins.
77.
▲
by
jdd
12y ago
lodash offers modules for node, es6, amd, individual npm packages and bundled in the primary npm package so you can even do require('lodash/array/chunk').
78.
▲
by
jdd
12y ago
It doesn't mean it's breaking in PhantomJS. The modern build lacks some iteration fixes for older environments is all. In the case of PhantomJS it's edge iteration of things like `arguments` objects. The modern build won'
79.
▲
by
jdd
12y ago
Yap it's tested in IE6 & full support. https://saucelabs.com/u/lodash
80.
▲
by
jdd
12y ago
lodash v2 offers an Underscore build that aligns its chaining and other API with Underscore providing a full drop-in replacement. However because lodash is a superset of Underscore those using the Underscore build lose out on additional met
81.
▲
by
jdd
12y ago
Lo-Dash 3.0 will be getting _.curryRight, _.rearg, & _.ary to complement _.curry. With them you can easily create auto-curried flavors of functions. var where = _(_.where).rearg(1,0).curry().value();
82.
▲
by
jdd
12y ago
The current stable version of Lo-Dash supports _.curry. In 3.0 Lo-Dash will add support _.rearg, _.ary, & _.curryRight. Using a combo of them you can easily create auto-curried functions. var where = _.curry(_.rearg(_.where,1,0));
83.
▲
by
jdd
12y ago
Lo-Dash 3.0 will have support for lazy evaluation in its chaining syntax that supports shortcut fusion and avoids intermediate arrays as well.
84.
▲
by
jdd
12y ago
There's lodash-contrib too – https://github.com/TheNodeILs/lodash-contrib
85.
▲
by
jdd
12y ago
Related to issue #1805 ( https://github.com/jashkenas/underscore/issues/1805 ) and other hn post ( https://news.ycombinator.com/item?id=8244700 ).
86.
▲
by
jdd
12y ago
From a glance of the source it doesn't look like PourOver is doing any heavy lifting with Underscore. PourOver works lodash.underscore build of Lo-Dash without issue though because it's not doing any heavy lifting you probably won
87.
▲
by
jdd
13y ago
Extending native prototypes creates other less obvious hurdles for libraries too. Craft.js, es5-shim, Modernizr, MooTools, Prototype.js, and Sugar.js, to name a few, have all, at one time or another, added incorrect shims to native prototyp
88.
▲
by
jdd
13y ago
To those saying "Why bother when there is ES5?", don't forget Lo-Dash/Underscore are more than the handful of ES5 methods. They each contain well over 100 utility methods for everything from iterating arrays and objects,
89.
▲
by
jdd
13y ago
It may help rereading the post as it does explain why both are on the list. FWIW you're linking to the pre-build dev source. Lo-Dash is available as modules for AMD, ES6, CommonJS, Node.js, and npm packages per method. https:/&#x
90.
▲
by
jdd
13y ago
Hi, creator of Lo-Dash here. Jeremy's comments are off base. I've gladly contributed to Underscore and am responsible for many of the fixes/features in the last few releases. I voluntarily revoked my commit rights to Undersco
More ›