String.prototype.contains
/**
* Wrapper for indexOf() to return true || false if string is contained within another string
* Will not not extend String if 'contains' already exists
*
* @param {String}
* @return {Boolean}
*/
if (typeof String.prototype.contains === 'undefined') {
String.prototype.contains = function(it) {
return this.indexOf(it) !== -1;
};
}
'pbojinov'.contains('p') === true;