3 ms·
https://github.com/mbostock/d3/blob/master/src/selection/html.js https://github.com/mbostock/d3/blob/master/src/selection/htm... I had to look this over the oth
by 91bananas 11y ago
https://github.com/mbostock/d3/blob/master/src/selection/html.js https://github.com/mbostock/d3/blob/master/src/selection/htm... I had to look this over the other day, I found it nearly unreadable.
- Stratoscope 11y agoThe problem with that code is partly the overuse of the ternary operator, but even more it's the wildly inappropriate code formatting and structure. Code that looks like this would be a WTF no matter what operators or statements it uses. Judicious, simple, and straightforward use of the ternary operator looks nothing like that.
- 91bananas 11y agoThe craziest part to me is if you look at the history of that file, that is the ONLY commit on that file ever. How does one write that the first time, and never have to touch it again!?