Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add !ES6 blocs for String:contains

  • Loading branch information...
commit fab9ad4b1cea99d907ad1ddaa33f6b2f6c83e117 1 parent f9307e0
@arian authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/Types/String.js
View
4 Source/Types/String.js
@@ -16,9 +16,11 @@ provides: String
String.implement({
+ //<!ES6>
contains: function(string, index){
return (index ? String(this).slice(index) : String(this)).indexOf(string) > -1;
},
+ //</!ES6>
test: function(regex, params){
return ((typeOf(regex) == 'regexp') ? regex : new RegExp('' + regex, params)).test(this);
@@ -82,9 +84,7 @@ String.implement({
});
//<1.4compat>
-
String.prototype.contains = function(string, separator){
return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : String(this).indexOf(string) > -1;
};
-
//</1.4compat>

0 comments on commit fab9ad4

Please sign in to comment.
Something went wrong with that request. Please try again.