consul/ui/packages/consul-ui/app/search/predicates/upstream-instance.js

13 lines
309 B
JavaScript
Raw Normal View History

export default () => term => item => {
const lowerTerm = term.toLowerCase();
return Object.entries(item)
.filter(([key, value]) => key !== 'DestinationType')
.some(
([key, value]) =>
value
.toString()
.toLowerCase()
.indexOf(lowerTerm) !== -1
);
};