feedback
Fancier console.log for Node.js cli apps
Install
npm install feedback --save
Usage
var feedback = ; // Strips all color from outputfeedbackcolor = false; //feeback // same as process.stdoutfeedback // same as write() but begins with a new linefeedback // same as console.log()feedback // same as console.log(), but adds "Success: " to beginningfeedback // same as console.log(), but adds "Warning: " to beginningfeedback // same as console.log() but add "Error: " to beginning
Unit Testing
Feedback provides you with the ability to mute the output to the bash at any time. This is especially useful when you're writing unit tests. You can do this by:
var feedback = ; feedbacktest = true;feedback; // This message won't get printed to the bash feedback;
Run tests
npm install
npm test