topojson / topojson-client

Manipulate TopoJSON, such as to merge shapes, and convert it back to GeoJSON.
ISC License
213 stars 63 forks source link

Add default export #28

Closed pedroapfilho closed 3 years ago

pedroapfilho commented 3 years ago

Right now, the only way to add use the the topojson-client is to import it like this:

import * as topojson from "topojson-client";

What if we export it in a way that we can use it like:

import topojson from "topojson-client";
mbostock commented 3 years ago

No. If you want to import everything, use * to import the namespace. Otherwise, import specific symbols, e.g., import {feature} from "topojson-client";. I don’t think it’s appropriate to make the namespace itself a symbol.