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

Do not modify built-in objects #1205

Closed
wKich opened this issue Jun 14, 2017 · 1 comment
Closed

Do not modify built-in objects #1205

wKich opened this issue Jun 14, 2017 · 1 comment

Comments

@wKich
Copy link

wKich commented Jun 14, 2017

https://github.com/beautify-web/js-beautify/blob/master/js/lib/beautify.js#L93-L107

Your library is not polyfill and it should not modify environment.

  1. May be you don't need Object.values at all in your code. I found only one place where it use and can be simply replaced to Object.keys equivalent.
  2. Or you can notify users, that them need to import Object.values polyfill manually.

I think first option is better.

@bitwiseman
Copy link
Member

@wKich - It doesn't quite work as Object.keys, but adding an array is fine.

bitwiseman added a commit to bitwiseman/js-beautify that referenced this issue Sep 8, 2017
bitwiseman added a commit to bitwiseman/js-beautify that referenced this issue Sep 8, 2017
bitwiseman added a commit to bitwiseman/js-beautify that referenced this issue Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants