You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the code is only exposed as a commonjs module which makes sense on Node, but is not optimal on the browser.
That'd be great to expose it under different module specs too. Something like UMD can be used to increase compatibility and support more environments.
The text was updated successfully, but these errors were encountered:
Hey @gmarty, you should be able to use twitter-cldr-js (or probably more likely twitter-cldr-npm) in the browser without too much trouble. We expose a commonjs module if module.exports is defined, otherwise we define a top-level object called TwitterCLDR on this, which is window in the browser. Could you explain why such an approach is not optimal? Is the concern adding something to the global namespace? What would you suggest to improve things?
I'd happily accept a pull request adding support for other module specs such as the ones described in UMD. Viva la open source.
Currently the code is only exposed as a commonjs module which makes sense on Node, but is not optimal on the browser.
That'd be great to expose it under different module specs too. Something like UMD can be used to increase compatibility and support more environments.
The text was updated successfully, but these errors were encountered: