Why waste time rewriting something like leftPad?
I'm suppose to make sure stupid shit like that doesn't happen. It's not a waste of my time. It's my job.
The whole leftPad controverse makes a pretty good case for rewriting. It would have saved many people a lot of trouble.
Also, if you know your langauge, rewriting it is probably faster than finding, installing and using a package.