Last active
December 26, 2018 02:01
-
-
Save aMarCruz/7892c05992d9ba559c99 to your computer and use it in GitHub Desktop.
Revisions
-
aMarCruz revised this gist
Jun 29, 2016 . 1 changed file with 5 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,14 @@ ;(function (sp) { if (!sp.startsWith) sp.startsWith = function (str) { return !!(str && this) && !this.lastIndexOf(str, 0) } if (!sp.endsWith) sp.endsWith = function (str) { var offset = str && this ? this.length - str.length : -1 return offset >= 0 && this.lastIndexOf(str, offset) === offset } })(String.prototype); -
aMarCruz revised this gist
Jul 30, 2015 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,12 +3,14 @@ var sp = String.prototype; if (!sp.startsWith) sp.startsWith = function (str) { return !this.lastIndexOf(str, 0) } if (!sp.endsWith) sp.endsWith = function (str) { var offset = this.length - str.length; return offset >= 0 && src.slice(offset) === str; } })(); -
aMarCruz revised this gist
Jul 30, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ var sp = String.prototype; if (!sp.startsWith) sp.startsWith = function (str) { return !this.lastIndexOf(str, 0) } if (!sp.endsWith) sp.endsWith = function (str) { -
aMarCruz renamed this gist
Jul 30, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
aMarCruz created this gist
Jul 16, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ ;(function () { var sp = String.prototype; if (!sp.startsWith) sp.startsWith = function (str) { !this.lastIndexOf(str, 0) } if (!sp.endsWith) sp.endsWith = function (str) { var offset = this.length - str.length; return offset >= 0 && this.indexOf(str, offset) == offset; } })();