-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
don't change string prototype #7
Comments
The error your co-worker is having is odd... What do you think about this polyfill ? |
That's a good find, but I'm still not a fan of changing the prototype. If you look at his code, the first line is if (!String.prototype.startsWith) { This means that if any other node module changes the prototype by adding a It just feels too risky to me to rely on. |
Fair enough. Will change it to a normal function. |
Additional ES6 import tests.
This means you are changing how
string
works for all code that depends on your code.It would be prefered to use a function or something like
underscore.string
. https://github.com/epeli/underscore.stringI'm not sure if this is related, but a co-worker is seeing this:
The text was updated successfully, but these errors were encountered: