r/ProgrammerAnimemes • • Jan 30 '20

OC Dependencies

Enable HLS to view with audio, or disable this notification

1.6k Upvotes

39 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Jan 31 '20

[deleted] — view deleted comment

6

u/bucket3432 Jan 31 '20

You could, but if you're going to do that, it's not much more work to just import it from somewhere, which has the additional benefit of being updatable in case there's a bug in the polyfill. Of course, apart from the overhead of importing a package, a big downside is that you're opening yourself up to the whole left-pad debacle.

The only major platform that doesn't support String.prototype.padStart is IE, so there's really no excuse not to use it.