matcher: function(item) {
return this.query.toLowerCase().split(" ").every(function(word){
return ~item.toLowerCase().indexOf(word);
});
}
matcher: function(item) {
var lowerCase = function (s) {
return s.toLowerCase();
};
var searchWords = this.query.split(' ').map(lowerCase);
var sourceWords = item.split(' ').map(lowerCase);
var result = sourceWords.filter(function (source) {
var found = searchWords.filter(function (w) {
return source == w;
});
return found.length > 0;
});
return result.length == searchWords.length;
}