All files / src globals.ts

100% Statements 12/12
100% Branches 2/2
100% Functions 5/5
100% Lines 11/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30    5x 5x     4x       6x       19x       4x       2x     5x 5x 5x 5x  
import chalk from "chalk";
 
let globalVerbose = false;
let globalYes = false;
 
export function setVerbose(v: boolean) {
	globalVerbose = v;
}
 
export function isVerbose() {
	return globalVerbose;
}
 
export function logVerbose(message: string) {
	if (globalVerbose) console.log(chalk.gray(message));
}
 
export function setYes(v: boolean) {
	globalYes = v;
}
 
export function isYes() {
	return globalYes;
}
 
export const success = chalk.green;
export const warn = chalk.yellow;
export const info = chalk.cyan;
export const danger = chalk.red;