Many popular npm packages depend on 6-8x more packages than they need to. Most of these are unnecessary polyfills and it's one of the key reasons node_modules folders are so large. The eslint ecosystem seems to be most affected by this.
When there is no need for the polyfill it should do nothing. The odd thing to me is that the functions were used directly like a function from a library.
This comes from the days of competing slightly-different polyfills. If you depend on the behaviour of one specific polyfill you don’t want to worry about some other package overwriting your polyfill with a different slightly incompatible one, thereby breaking your feature.
Slightly shocking that nobody is doing the maintenance to remove these old redundant polyfills tho.
This comes from the days of competing slightly-different polyfills. If you depend on the behaviour of one specific polyfill you don’t want to worry about some other package overwriting your polyfill with a different slightly incompatible one, thereby breaking your feature.
Slightly shocking that nobody is doing the maintenance to remove these old redundant polyfills tho.