blob: 9bddbe989d6fdb771c53d256ef8bf92a3ee2ab69 [file] [log] [blame]
module.exports = new LiteralSearchStrategy();
function LiteralSearchStrategy(){
var self = this;
function doMatch(string,crit){
return string.toLowerCase().indexOf(crit.toLowerCase()) >= 0;
}
self.matches = function(string,crit){
if( typeof string !== 'string' ) return false;
string = string.trim();
return doMatch(string,crit);
};
};