@cowwoc/requirements
Version:
A fluent API for enforcing design contracts with automatic message generation.
30 lines • 849 B
JavaScript
import chalk from "chalk";
import { AbstractColorWriter } from "../../internal.mjs";
const greenBackground = chalk.bgRgb(0, 135, 0);
const redBackground = chalk.bgRgb(175, 0, 0);
/**
* A node terminal that supports 16 million colors.
*
* @see <a href="https://gist.github.com/XVilka/8346728">https://gist.github.com/XVilka/8346728</a>
*/
class Node16MillionColors extends AbstractColorWriter {
constructor() {
super();
}
afterFlush() {
}
decorateInsertedText(text) {
return greenBackground(chalk.whiteBright(text));
}
decorateDeletedText(text) {
return redBackground(chalk.whiteBright(text));
}
decorateEqualText(text) {
return text;
}
decoratePadding(text) {
return text;
}
}
export { Node16MillionColors };
//# sourceMappingURL=Node16MillionColors.mjs.map