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

14 lines
277 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import rightTrim from 'consul-ui/utils/right-trim';
export default {
Key: (item) =>
rightTrim(item.Key.toLowerCase())
.split('/')
.filter((item) => Boolean(item))
.pop(),
};