consul/ui/packages/consul-ui/app/utils/isFolder.js

6 lines
166 B
JavaScript

// Boolean if the key is a "folder" or not, i.e is a nested key
// that feels like a folder.
export default function (path = '') {
return path.slice(-1) === '/';
}