Created
February 18, 2020 09:37
-
-
Save m4n1ok/bf8f3f4d1eac9a7ae74a4312ead7b33a to your computer and use it in GitHub Desktop.
A simple wrapper around console.log / chalk / terminal-link to have nice log into node.js program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chalk = require('chalk') | |
const terminalLink = require('terminal-link') | |
const log = console.log | |
module.exports = { | |
log, | |
chalk, | |
terminalLink, | |
success: (msg) => log(chalk.green(msg)), | |
warning: (msg) => log(chalk.yellow(`⚠️ ${msg}`)), | |
error: (msg) => log(chalk.red(`❌️ ${msg}`)), | |
separator: () => log(chalk.black('\n------------------------------------\n')), | |
underline: chalk.underline | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: