jdd
jdd on Hacker News
Node will likely end up with multiple ways to disambiguate modules. Until then, you might dig
https://npmjs.com/esm. No .mjs required.
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.
npm5 and 5.1 has improved performance significantly so that it's comparable with yarn.
The TS response makes sense in light of the other issues your desired behavior would cause.
Naw, Lodash is modular. You can cherry-pick its modules. It's less than 716 bytes (with lodash-webpack-plugin).
This! Lodash turns 5 in 4 months :)
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.
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 only JS foundation I knew of that was open to outside projects (the jQuery Foundation was really only for jQuery projects back then). Eventually the Dojo Foundation and the jQuery Foundation merged. It was great! Regardless of the name the foundation has proven valuable. Whether it's CLA management, PR bots, conduct reviews, representation at TC39, help with trademarks, licenses, legal, etc. they've always been friendly and more than happy to help. When possible they also hold events to educate and encourage new open source contributors which is pretty cool!
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` modules over the `lodash.xyz` packages because of plugins like:
https://github.com/lodash/babel-plugin-lodash
https://github.com/lodash/lodash-webpack-plugin
Though in the future lodash-webpack-plugin may support `lodash.xyz` packages too.
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.
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).
Neither Rollup nor Webpack 2 will tree-shake Lodash properly. The best option at the moment is babel-plugin-lodash.
Lodash methods handle things like String#match which returns array/null.
More for avoiding guard scaffolding than for undefined behavior.
Lodash follows semver so major changes are opt-in unlike lang level ones though.
I donno, Lodash is missing < 90 R apis where as R is missing > 200 Lodash ones.