Created
May 3, 2016 18:01
-
-
Save Diullei/564625ad829852688153ced6a9d18580 to your computer and use it in GitHub Desktop.
This file contains 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 (typeof(String.prototype.equals) === "undefined") { | |
String.prototype.equals = function(compare) { | |
return new RegExp('^' + this + '$', 'i').test(compare); | |
} | |
} | |
// example | |
"TESTE".quals("teste"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment