kui-shell
Version:
This is the monorepo for Kui, the hybrid command-line/GUI electron-based Kubernetes tool
18 lines • 614 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const debug_1 = require("debug");
const debug = debug_1.default('k8s/view/util/selectors');
exports.selectorToString = (selector) => {
if (selector.matchLabels) {
return exports.selectorToString(selector.matchLabels);
}
else if (selector.matchExpressions) {
return '';
}
const stringified = Object.keys(selector)
.map(key => `-l ${key}=${selector[key]}`)
.join(' ');
debug('selectorToString', stringified, selector);
return stringified;
};
//# sourceMappingURL=selectors.js.map