Skip to content

Instantly share code, notes, and snippets.

@caderek
Created May 25, 2018 14:47
Show Gist options
  • Save caderek/8290fa6632909f45ce653ed36183e504 to your computer and use it in GitHub Desktop.
Save caderek/8290fa6632909f45ce653ed36183e504 to your computer and use it in GitHub Desktop.
/* eslint-disable no-console */
const chalk = require('chalk');
exports.log = {
info(...args) {
console.log(chalk.blue(...args));
},
success(...args) {
console.log(chalk.green(...args));
},
warning(...args) {
console.warn(chalk.yellow(...args));
},
error(...args) {
console.log(chalk.red(...args));
},
data(data, depth = null) {
console.dir(data, { colors: true, depth });
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment