mirror of https://github.com/status-im/consul.git
13 lines
259 B
JavaScript
13 lines
259 B
JavaScript
|
import PredicateSearch from './predicate';
|
||
|
|
||
|
export default class ExactSearch extends PredicateSearch {
|
||
|
predicate(s) {
|
||
|
s = s.toLowerCase();
|
||
|
return (item = '') =>
|
||
|
item
|
||
|
.toString()
|
||
|
.toLowerCase()
|
||
|
.indexOf(s) !== -1;
|
||
|
}
|
||
|
}
|