▲ | whilenot-dev 6 days ago | |||||||||||||||||||||||||
Are you serious here? It isn't a polyfill, it's supposed to work on plain objects which isn't part of the spec at all. Besides that, Array.prototype.forEach is only unsupported in Android Browser 4.3 (from July 2013) and IE8 (from May 2008). Seems like a weird reasoning to add it to packages in 2025. | ||||||||||||||||||||||||||
▲ | motorest 6 days ago | parent | next [-] | |||||||||||||||||||||||||
> Are you serious here? I am. If you check the definition of polyfill, you'll eventually arrive at something like the following: > A polyfill is a piece of code (usually JavaScript on the Web) used to provide modern functionality on older browsers that do not natively support it. https://developer.mozilla.org/en-US/docs/Glossary/Polyfill I think we would agree that foreach fits the definition, happy path, and whole purpose of a polyfill. if you read up on forEach, you will notice that Array.prototype.forEach requires objects to be callable. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | 5 days ago | parent | prev [-] | |||||||||||||||||||||||||
[deleted] |