Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using let limits browser and node support #19

Closed
atkinchris opened this issue Nov 17, 2016 · 2 comments
Closed

Using let limits browser and node support #19

atkinchris opened this issue Nov 17, 2016 · 2 comments

Comments

@atkinchris
Copy link

atkinchris commented Nov 17, 2016

This commit (2296030) replaces var with let for ES2015 style. However, the let syntax is not widely supported, and breaks with some toolsets, such as uglify.

This could be resolved by:

  • Reverting to supported syntax of var, or
  • Transpile the npm published version to ES5.
@atkinchris atkinchris changed the title + Using let limits browser and node support Nov 17, 2016
@atkinchris atkinchris reopened this Nov 17, 2016
@sindresorhus
Copy link
Owner

This module mainly targets Node.js. If you want to use it in the browser it's up to you to resolve it, like transpiling it with Babel.

@futpib
Copy link

futpib commented Jan 4, 2017

What about publishing a transpiled file and adding a browser field to package.json for easy usage with browserify/webpack? Would such PR be welcome or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants