r/ProgrammerAnimemes • u/bucket3432 • Jan 30 '20
OC Dependencies
Enable HLS to view with audio, or disable this notification
1.6k
Upvotes
r/ProgrammerAnimemes • u/bucket3432 • Jan 30 '20
Enable HLS to view with audio, or disable this notification
View all comments
Show parent 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.padStartis IE, so there's really no excuse not to use it.