d3 / d3-geo-projection

Extended geographic projections for d3-geo.
https://observablehq.com/collection/@d3/d3-geo-projection
Other
1.1k stars 201 forks source link

There are es2015 in the final package file #183

Closed zhubin1992 closed 4 years ago

zhubin1992 commented 4 years ago

d3-geo-projection@2.8.0/dist/d3-geo-projection.js (:445)

function solve2d(f, MAX_ITERATIONS = 40, eps = epsilon2) {
  return function(x, y, a = 0, b = 0) {
    ...
  };
}

Default function parameters are ECMAScript 2015.That will cause some errors.

zhubin1992 commented 4 years ago

We need use Babel to use the latest JavaScript features that aren't yet supported by browsers and Node.js.

Fil commented 4 years ago

My mistake. I always forget. Thank you!

mbostock commented 4 years ago

You can add an eslint rule to remind you if you like.