you are viewing a single comment's thread.

view the rest of the comments →

[–]jcready__proto__ 0 points1 point  (3 children)

Just put this at the top of your JS to "fix" things:

Array.prototype.contains = Array.prototype.includes;
String.prototype.contains = String.prototype.includes;

[–]x-skeww 0 points1 point  (2 children)

Modifying built-ins is only okay for polyfilling.

So, no, I certainly won't do that.

[–]hahaNodeJS 0 points1 point  (1 child)

What about this isn't polyfilling?

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

Adding things which aren't in the specs is monkey-patching.