Skip to content

Instantly share code, notes, and snippets.

@kayz1
Created October 17, 2013 16:31
Show Gist options
  • Save kayz1/7028014 to your computer and use it in GitHub Desktop.
Save kayz1/7028014 to your computer and use it in GitHub Desktop.
if (!('contains' in String.prototype)) {
String.prototype.contains = function(str, startIndex) {
return ''.indexOf.call(this, str, startIndex) !== -1;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment