orling / grapheme-splitter

A JavaScript library that breaks strings into their individual user-perceived characters.
MIT License
917 stars 45 forks source link

add conditional around module.export #17

Closed neoskunk closed 6 years ago

neoskunk commented 6 years ago

When attempting to use this library client side, loaded via CDN an error occurs if no module system is being used. This small change allows the library to work with and without a module system.

Closes #16

neoskunk commented 6 years ago

@orling thanks for accepting this. I use your library hosted at https://www.jsdelivr.com/package/npm/grapheme-splitter. Any chance you could make a new release with these changes?

orling commented 6 years ago

@neoskunk I'll try to update the library on npm in a couple days, that's the only place I publish it. I don't know who maintains it on jsdelivr.com, or if it will take it up automatically