d3 / d3-shape

Graphical primitives for visualization, such as lines and areas.
https://d3js.org/d3-shape
ISC License
2.48k stars 308 forks source link

ES6 in README code #172

Closed curran closed 3 years ago

curran commented 3 years ago

I was reading through the README and noticed ES5 in the sample code. In fact there was mixed ES5 and ES6 (some arrow function expressions, and some ES5 functions).

This PR unifies the sample code to consistently use ES6, including let, const, and arrow function expressions.

curran commented 3 years ago

Related discussion: Stance on var vs. let & const? https://github.com/d3/d3/issues/3435

curran commented 3 years ago

Oh nice idea! Will iterate.

curran commented 3 years ago

Made that change. Thanks @Fil for reviewing!