consul/ui/packages/consul-ui/app/utils/search/exact.js

13 lines
259 B
JavaScript
Raw Normal View History

import PredicateSearch from './predicate';
export default class ExactSearch extends PredicateSearch {
predicate(s) {
s = s.toLowerCase();
return (item = '') =>
item
.toString()
.toLowerCase()
.indexOf(s) !== -1;
}
}