1.0.5 • Published 5 years ago
throwlog v1.0.5
ThrowLog
When you just want to throw some logging into the CLI
Install with yarn or npm
yarn add throwlog
npm -i throwlogNormal usage:
import {dump, info, success, warn, error, kill} from 'throwlog';info,success,warn,errorwill print a string in a colorfull box to stdoutdumpwill take any data structure and print it nicely to stderrkillwill halt the program after dumping first parameter and error'ing the second parameter (if any). Both to stderr
Examples
let email = process.env.EMAIL || kill('Please set EMAIL')info('About to fix things')
let data = fixThings()
success('Things fixed')
dump(data)