Skip to content

Commit

Permalink
Add util
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyRightNow committed Mar 16, 2017
1 parent a589d05 commit cf4f2d7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/util.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const chalk = require('chalk');

const printGreen = function (str) {
console.log(chalk.green(str));
}

const printRed = function (str) {
console.log(chalk.red(str));
}

const printNewLine = function () {
console.log("");
}

const print = function () {
console.log.apply(console, Array.from(arguments));
}

const printAndNewLine = function () {
print.apply(null, Array.from(arguments));
printNewLine();
}

module.exports = {
printGreen,
printRed,
printNewLine,
print,
printAndNewLine
};

0 comments on commit cf4f2d7

Please sign in to comment.