mapbox / polylabel

A fast algorithm for finding the pole of inaccessibility of a polygon (in JavaScript and C++)
Other
1.44k stars 151 forks source link

How to import using ES6 syntax? #9

Closed DenisCarriere closed 8 years ago

DenisCarriere commented 8 years ago

Having issues wrapping my head around importing this module using a ES6 syntax.

Can you elaborate on how to import this module?

Which one of these would be ES6 valid and still functional?

const polylabel = require('polylabel')
import polylabel from 'polylabel'
import { polylabel } from 'polylabel'
import * as polylabel from 'polylabel'
mourner commented 8 years ago

-> #10