codejoust/session.js — Issue #20: Don't change String.prototype
Author: Radagaisus
Created: 2012-02-14 23:55:21+00:00
State: open

```javascript
String.prototype.contains = function(other_str){
if (typeof(other_str) === 'string'){
return (this.indexOf(other_str) !== -1); }
for (var i = 0; i < other_str.length; i++){
if (this.indexOf(other_str[i]) !== -1){ return true; } }
return false; }
```

Should be a helper function that doesn't "pollute" the global namespace.