HNHacker News
TopNewBestAskShowJobs

jdd

61 karma · joined April 14, 2009

submissionscomments
jdd··on ECMAScript modules in Node.js: the new plan
Node will likely end up with multiple ways to disambiguate modules. Until then, you might dig https://npmjs.com/esm. No .mjs required.
jdd··on ECMAScript modules in Node.js: the new plan
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.

jdd··on Using ES modules natively in Node.js
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-today-...

jdd··on Npm v5.1.0 Released
npm5 and 5.1 has improved performance significantly so that it's comparable with yarn.
jdd··on Ask HW: What is the state (for you) of CoffeeScript?
The TS response makes sense in light of the other issues your desired behavior would cause.
jdd··on Idx: Easily access deeply nested nullable fields in JavaScript
Naw, Lodash is modular. You can cherry-pick its modules. It's less than 716 bytes (with lodash-webpack-plugin).
jdd··on Webpack 2, RC 7
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

jdd··on JavaScript frameworks and topics to learn in 2017
Not smell just semver – http://semver.org/
jdd··on JavaScript frameworks and topics to learn in 2017
This! Lodash turns 5 in 4 months :)
jdd··on Dear JavaScript
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.

jdd··on Dear JavaScript
:clap:
jdd··on Zaphod: Clojure's API for JavaScript's Data Structures
You might dig lodash-bound – Enables chained lodash functions with ES bind (::) syntax

https://github.com/elado/lodash-bound

jdd··on Immutable.js: An Introduction with examples written for humans
You might dig mudash – Lodash wrapper providing immutable.js support

https://github.com/brianneisler/mudash

jdd··on A small dive into, and rejection of, Elm
If you dig immutable, auto-curried, data-last methods there's also lodash/fp modules –

https://github.com/lodash/lodash/wiki/FP-Guide

jdd··on The Linux Foundation Unites the JavaScript Community for Open Web Development
Yep, as well as outside donations – https://jquery.org/

Every bit helps.

jdd··on The Linux Foundation Unites the JavaScript Community for Open Web Development
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!
jdd··on A Simple JavaScript change to reduce your build size
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://github.com/lodash/lodash-webpack-plugin

jdd··on Show HN: In-view.js – Get notified when DOM elements enter or exit the viewport
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.

jdd··on Show HN: In-view.js – Get notified when DOM elements enter or exit the viewport
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.

jdd··on Babili: An ES6+ aware minifier based on the Babel toolchain
Congrats!
jdd··on Just: A library of dependency-free JS utilities that do just do one thing
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).

jdd··on Just: A library of dependency-free JS utilities that do just do one thing
Neither Rollup nor Webpack 2 will tree-shake Lodash properly. The best option at the moment is babel-plugin-lodash.
jdd··on Just: A library of dependency-free JS utilities that do just do one thing
Related: https://twitter.com/jdalton/status/754474672977096704.
jdd··on Just: A library of dependency-free JS utilities that do just do one thing
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/@jdalton/just-a-heads-up-the-lazy-js-benc...

jdd··on Just: A library of dependency-free JS utilities that do just do one thing
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 bundle size optimizations a breeze too.

https://github.com/lodash/babel-plugin-lodash

https://github.com/lodash/lodash-webpack-plugin

jdd··on Lists of JavaScript methods which you can use natively
Lodash methods handle things like String#match which returns array/null.

More for avoiding guard scaffolding than for undefined behavior.

jdd··on Lists of JavaScript methods which you can use natively
You also dig Lodash v4's FP modules

https://github.com/lodash/lodash/wiki/FP-Guide

jdd··on Lists of JavaScript methods which you can use natively
Webpack 2 or Rollup don't tree-shake Lodash well.

You'll need something like https://github.com/lodash/babel-plugin-lodash.

jdd··on Lists of JavaScript methods which you can use natively
Lodash follows semver so major changes are opt-in unlike lang level ones though.
jdd··on Lists of JavaScript methods which you can use natively
I donno, Lodash is missing < 90 R apis where as R is missing > 200 Lodash ones.
Page 1 of 4Next →