You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemmionic5/Mohem/node_modules_/speed-measure-webpack-plugin/colours.js

13 lines
353 B
JavaScript

const chalk = require("chalk");
module.exports.fg = (text, time) => {
let textModifier = chalk.bold;
if (time > 10000) textModifier = textModifier.red;
else if (time > 2000) textModifier = textModifier.yellow;
else textModifier = textModifier.green;
return textModifier(text);
};
module.exports.bg = text => chalk.bgBlack.green.bold(text);