max-mapper / simplify-geojson

apply the ramer-douglas-peucker line simplification to geojson features or feature collections in JS or on the CLI
177 stars 17 forks source link

Support ES6 modules #10

Open panuhorsmalahti opened 7 years ago

panuhorsmalahti commented 7 years ago

Modules don't allow exporting the whole module as a function in ES6:

https://github.com/Microsoft/TypeScript/issues/5867#issuecomment-161119689

My suggestion for a fix is to export the function from the module instead of exporting the function as the module.

bcomnes commented 7 years ago

Does this module not work with a specific es module loader? Do they not translate this into:

import simplifyGeojson, {simplify} from 'simplify-geojson'

?