Merge pull request #163 from xPaw/remove-contains
Remove string.contains
This commit is contained in:
commit
c09016a6b1
@ -1,18 +0,0 @@
|
||||
//
|
||||
// Check if string contains any of the supplied words.
|
||||
//
|
||||
// Usage:
|
||||
// "".contains(a, b, ...);
|
||||
//
|
||||
// Returns [true|false]
|
||||
//
|
||||
String.prototype.contains = function() {
|
||||
var args = arguments;
|
||||
for (var i in args) {
|
||||
var str = args[i];
|
||||
if (typeof str === "string" && this.indexOf(str) > -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
Loading…
Reference in New Issue
Block a user