Permalink
Browse files

Sleeker indexOf evaluation. Minor.

  • Loading branch information...
1 parent 14ee5c7 commit 9e14b4649f158780d29517114bb4c17f5c20b56e @paulirish paulirish committed Mar 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 modernizr.js
View
@@ -229,7 +229,7 @@ window.Modernizr = (function(window,document,undefined){
* contains returns a boolean for if substr is found within str.
*/
function contains( str, substr ) {
- return (''+str).indexOf( substr ) !== -1;
+ return ~(''+str).indexOf( substr );
}
/**

0 comments on commit 9e14b46

Please sign in to comment.