open-consul/ui/packages/consul-ui/app/search/predicates/kv.js

10 lines
246 B
JavaScript
Raw Normal View History

import rightTrim from 'consul-ui/utils/right-trim';
export default {
Key: (item, value) =>
rightTrim(item.Key.toLowerCase())
.split('/')
.filter(item => Boolean(item))
.pop()
.indexOf(value.toLowerCase()) !== -1,
};