@code-pushup/cli
Version:
A CLI to run all kinds of code quality measurements to align your team with company goals
26 lines • 735 B
JavaScript
import { bold, dim, green } from 'ansis';
export function titleStyle(title) {
return `${bold(title)}`;
}
export function headerStyle(title) {
return `${green(title)}`;
}
export function descriptionStyle(title) {
return `${dim(title)}`;
}
export function formatObjectValue(opts, propName) {
const description = opts[propName];
return {
...opts,
...(typeof description === 'string' && {
[propName]: descriptionStyle(description),
}),
};
}
export function formatNestedValues(options, propName) {
return Object.fromEntries(Object.entries(options).map(([key, opts]) => [
key,
formatObjectValue(opts, propName),
]));
}
//# sourceMappingURL=formatting.js.map