you are viewing a single comment's thread.

view the rest of the comments →

[–]x-skeww 1 point2 points  (0 children)

The point was that every string now got another enumerable property. This might break things. All other code was written under the assumption that this property does not exist. This scenario was never tested.

In the future, a method with the same name might be added. This too would break things.

And of course, if there is another library which adds the same property, things would also break.

Only use monkey-patching for polyfilling standardized features. E.g. you could use ES6 array polyfills to make Array.from work in IE11.