HNHacker News
TopNewBestAskShowJobs

jdd

61 karma · joined April 14, 2009

submissionscomments
jdd··on Lists of JavaScript methods which you can use natively
Many times folks understand that values can be nullish. Libs like Lodash treat them as empty collections to avoid repetitive nullish check scaffolding.
jdd··on Lists of JavaScript methods which you can use natively
;)
jdd··on Lists of JavaScript methods which you can use natively
I'm guessing after repeated use you'd abstract that into a function. Maybe even a collection of them.
jdd··on Lists of JavaScript methods which you can use natively
The language changes too. In ES5 `Object.keys` throws an error for `Object.keys('abc')` but in ES6 it returns an array.
jdd··on Lists of JavaScript methods which you can use natively
The kitchen sink size of Lodash is ~22kb gzipped, the core build is ~4kb gzipped, and it's modular so you can cherry-pick what you want

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
You might dig

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

jdd··on Lists of JavaScript methods which you can use natively
Lodash is helping with JavaScript language additions like

https://github.com/leobalter/object-enumerables

https://github.com/bterlson/proposal-flatMap

jdd··on Lists of JavaScript methods which you can use natively
You should check out

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
You might dig

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

jdd··on Lists of JavaScript methods which you can use natively
Lodash v4 has support for FP syntax/modules – https://github.com/lodash/lodash/wiki/FP-Guide
jdd··on Unambiguous JavaScript Grammar
That's generally and edge case and totally supported under the proposal by being explicit about with respect to `export`.

I think being explicit about the intent of your code is a good thing after all.

jdd··on Ask HN: What are examples of GitHub repositories with high code quality?
Lodash source is available as a monolithic build or modules so you can take your pick.

Lodash has plenty of comments (jsdoc, bug fix notes, and implementation explanations). Underscore has stripped many of these leading to devs making the same mistakes or introducing regressions.

Lodash docs are arranged in alphabetic order. Underscore docs aren't and even have thing miscategorized.

jdd··on Ask HN: What are examples of GitHub repositories with high code quality?
> LoDash is a better library, functionality-wise, but seems to have lost the quality somewhat

Where do you see a loss in quality?

jdd··on LeftPad and Go: can tooling help?
Lodash is modular (https://github.com/lodash/lodash/tree/4.7.0-npm)

and also provides per method packages (https://www.npmjs.com/browse/keyword/lodash-modularized)

like padStart (https://www.npmjs.com/package/lodash.padstart)

jdd··on The Way of the Gopher: Making the Switch from Node.js to Golang
Lodash introduces breaking changes in major version bumps (following semver).

So upgrades are optional and not pulling the rug out from underneath the feet of devs.

Major releases allows the project to make corrections and avoid carrying around years of baggage.

jdd··on State of the Art JavaScript in 2016
Lodash v4 has its FP module included with it: require('lodash/fp') for immutable, auto-curried, iteratee-first, data-last method modules.
jdd··on NPM and Left-Pad: Have We Forgotten How to Program?
Lodash renamed padding on a major version bump (which requires opting into) to better align with the ES7 proposal.

Nothing was done in a way to pull the rug out from underneath folks.

jdd··on Left-pad as a service
Naw, I changed it on a major bump which requires opt-in and didn't pull the rug out from underneath people.

As @sod pointed out the change is based on the newish ES7 proposal.

jdd··on I've Just Liberated My Modules
If there was ever an issue I'd work with npm to come to a resolution that didn't break 25% of npm.
jdd··on I've Just Liberated My Modules
Lodash has been modular since 2013.
jdd··on CoreUtils implemented in pure JavaScript
Webpack 2 and Rollup don't support tree-shaking with Lodash yet. You'll need to use https://www.npmjs.com/package/babel-plugin-lodash.
jdd··on Lodash 4.0.0 is out
Adoption is doing pretty well. In just over 2 weeks since its release lodash@^4.0.0 is in the top 50 most depended on npm packages.
jdd··on Lodash 4.0.0 is out
Lodash v1 was a drop-in Underscore replacement.

Lodash v2 was not but offered an lodash.underscore.js build.

Lodash v3 dropped the compat build in favor of using individual lodash modules until you're able to transition

Lodash v4 continues the view of v3

jdd··on Lodash 4.0.0 is out
It was removed because it added extra complexity for method implementations and was used very little. Folks now can use `_.bind`, or `Function#bind`, or arrow functions.
jdd··on Lodash 4.0.0 is out
¯\_(ツ)_/¯
jdd··on Lodash 4.0.0 is out
According to bower stats over the last 7 days lodash was installed 23 times compared to 4 million npm downloads & 181 new npm packages depending on it.

http://bower.io/stats/

http://npm-stat.com/charts.html?package=lodash

https://gist.github.com/anvaka/8e8fa57c7ee1350e3491/revision...

jdd··on Microsoft Edge's JavaScript engine to go open-source
To be fair that's a sample app which is part of a tutorial demonstrating the capabilities of the web platform on Windows 10.

https://github.com/MicrosoftEdge/JSBrowser

jdd··on The Beauty of Clojure
JavaScript (lodash-fp):

    _.flow(_.range(0,10), _.map(_.add(2)), _.sum)();

    //With slightly more magic
    let {flow, range, map, add, sum} = _;
    flow(range(0), map(add(2)), sum)(10);
jdd··on Lodash: 10 JavaScript Utility Functions That You Should Properly Stop Rewriting
If the function is small enough, yes.
jdd··on Currying in JavaScript
For those interested lodash provides _.curry and _.curryRight methods with placeholder support as well.

See https://lodash.com/docs#curry.

← PreviousPage 2 of 4Next →