blob: 9bddbe989d6fdb771c53d256ef8bf92a3ee2ab69 [file] [log] [blame]
bigbiffd006b302015-03-06 18:36:03 -05001module.exports = new LiteralSearchStrategy();
2
3function LiteralSearchStrategy(){
4 var self = this;
5
6 function doMatch(string,crit){
7 return string.toLowerCase().indexOf(crit.toLowerCase()) >= 0;
8 }
9
10 self.matches = function(string,crit){
11 if( typeof string !== 'string' ) return false;
12 string = string.trim();
13 return doMatch(string,crit);
14 };
15};