Skip to content

Instantly share code, notes, and snippets.

@gserb
Last active June 21, 2019 07:51
Show Gist options
  • Save gserb/90ce59d38c5798217ba1a8454fbfc14a to your computer and use it in GitHub Desktop.
Save gserb/90ce59d38c5798217ba1a8454fbfc14a to your computer and use it in GitHub Desktop.

Revisions

  1. George Serbanescu revised this gist Jun 21, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion padStart_polyfill.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    if (!String.prototype.padStart) {
    String.prototype.padLeft = function (n,str){
    String.prototype.padStart = function (n,str){
    return Array(n-String(this).length+1).join(str||'0')+this;
    }
    }
  2. George Serbanescu created this gist Jun 21, 2019.
    5 changes: 5 additions & 0 deletions padStart_polyfill.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    if (!String.prototype.padStart) {
    String.prototype.padLeft = function (n,str){
    return Array(n-String(this).length+1).join(str||'0')+this;
    }
    }