Last active
June 21, 2019 07:51
-
-
Save gserb/90ce59d38c5798217ba1a8454fbfc14a to your computer and use it in GitHub Desktop.
padStart polyfill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!String.prototype.padStart) { | |
| String.prototype.padStart = function (n,str){ | |
| return Array(n-String(this).length+1).join(str||'0')+this; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment