Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jdd
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
jdd
8y ago
Node will likely end up with multiple ways to disambiguate modules. Until then, you might dig https://npmjs.com/esm . No .mjs required.
2.
▲
by
jdd
8y ago
The `esm` loader allows specifying a parse goal pragma as one of several ways to disambiguate source – https://npmjs.com/esm . Node will likely end up needing more than just an extension to disambiguate as well.
3.
▲
by
jdd
9y ago
I know styfle is aware, but for others, you can unlock named exports of CJS modules with @std/esm: https://github.com/standard-things/esm https://medium.com/web-on-the-edge/es-modules-in-node-
4.
▲
by
jdd
9y ago
npm5 and 5.1 has improved performance significantly so that it's comparable with yarn.
5.
▲
by
jdd
9y ago
The TS response makes sense in light of the other issues your desired behavior would cause.
6.
▲
by
jdd
9y ago
Naw, Lodash is modular. You can cherry-pick its modules. It's less than 716 bytes (with lodash-webpack-plugin).
7.
▲
by
jdd
10y ago
You might be able to fix that with something like babel-plugin-lodash which can be ran over your code (and deps) to enforce cherry-picking across the board. https://github.com/lodash/babel-plugin-lodash
8.
▲
by
jdd
10y ago
Not smell just semver – http://semver.org/
9.
▲
by
jdd
10y ago
This! Lodash turns 5 in 4 months :)
10.
▲
by
jdd
10y ago
I dig Babel 6. I'm glad they took the major bump, which allows breaking changes, to improve things. The major bump means it's opt-in, so folks can continue to use the older version without breaking their workflow.
11.
▲
by
jdd
10y ago
:clap:
12.
▲
by
jdd
10y ago
You might dig lodash-bound – Enables chained lodash functions with ES bind (::) syntax https://github.com/elado/lodash-bound
13.
▲
by
jdd
10y ago
You might dig mudash – Lodash wrapper providing immutable.js support https://github.com/brianneisler/mudash
14.
▲
by
jdd
10y ago
If you dig immutable, auto-curried, data-last methods there's also lodash/fp modules – https://github.com/lodash/lodash/wiki/FP-Guide
15.
▲
by
jdd
10y ago
Yep, as well as outside donations – https://jquery.org/ Every bit helps.
16.
▲
by
jdd
10y ago
Creator of Lodash here. From my experience the foundation is a pretty chill, hands off, non-profit. I sought out and voluntarily joined the Dojo Foundation early in Lodash's development (~2013). At the time the Dojo Foundation was the
17.
▲
by
jdd
10y ago
No-trololo: Lodash is modular so you can use cherry-pick the methods you want. There's plugins to make it easier and further reduce bundle sizes. https://github.com/lodash/babel-plugin-lodash https://gi
18.
▲
by
jdd
10y ago
lodash.throttle is a standalone zero-dependency package of just the throttle module. The `lodash` package is a collection of modules one of which is `lodash/throttle`. You can generally get smaller bundles using `lodash/xyz` modul
19.
▲
by
jdd
10y ago
No worries, lodash/debounce can be reduced further with babel+webpack plugins. Assuming the current setup of babel+webpack the difference between your naive version is just ~0.5 kB.
20.
▲
by
jdd
10y ago
Congrats!
21.
▲
by
jdd
10y ago
There's no hard requirement for babel-polyfill or babel-runtime. Babel works great without shims in modern enviros (I don't use shims in my projects).
22.
▲
by
jdd
10y ago
Neither Rollup nor Webpack 2 will tree-shake Lodash properly. The best option at the moment is babel-plugin-lodash.
23.
▲
by
jdd
10y ago
Related: https://twitter.com/jdalton/status/754474672977096704 .
24.
▲
by
jdd
10y ago
BTW there's lodash/fp modules too: https://github.com/lodash/lodash/wiki/FP-Guide https://simonsmith.io/dipping-a-toe-into-functional-js-with-... https://medium.com/
25.
▲
by
jdd
10y ago
Lodash v4 reduced the deps of its individual modularized method packages. It also offers modules inside the primary package now, e.g. require('lodash/chunk'). There's babel and webpack plugins to make cherry-picking and
26.
▲
by
jdd
10y ago
Lodash methods handle things like String#match which returns array/null. More for avoiding guard scaffolding than for undefined behavior.
27.
▲
by
jdd
10y ago
You also dig Lodash v4's FP modules https://github.com/lodash/lodash/wiki/FP-Guide
28.
▲
by
jdd
10y ago
Webpack 2 or Rollup don't tree-shake Lodash well. You'll need something like https://github.com/lodash/babel-plugin-lodash .
29.
▲
by
jdd
10y ago
Lodash follows semver so major changes are opt-in unlike lang level ones though.
30.
▲
by
jdd
10y ago
I donno, Lodash is missing < 90 R apis where as R is missing > 200 Lodash ones.
More ›