client/assets/scripts/services/search.js
function (items, query) {
        if (!config.exactMatch || !config.searchField.name) {
          return items;
        }
        var list = items;
        var match = _.findIndex(list, function (item) {
          return query.toLowerCase() === item.name.toLowerCase();
        });
        if (match !== -1) {
          list.splice(0, 0, list.splice(match, 1)[0]);
        }
        return list;
      }
function (items, query) {
        if (!config.exactMatch || !config.searchField.name) {
          return items;
        }
        var list = items;
        var match = _.findIndex(list, function (item) {
          return query.toLowerCase() === item.name.toLowerCase();
        });
        if (match !== -1) {
          list.splice(0, 0, list.splice(match, 1)[0]);
        }
        return list;
      }
function ( items , query ) { if ( ! config . exactMatch || ! config . searchField . name ) { return items ; } var list = items ; var match = _ . findIndex ( list , function ( item ) { return query . toLowerCase ( ) === item . name . toLowerCase ( ) ; } ) ; if ( match !== - 1 ) { list . splice ( 0 , 0 , list . splice ( match , 1 ) [ 0 ] ) ; } return list ; }
Prioritize exact match
Prioritize exact match