feedback
Fancier console.log for Node.js cli apps
Last updated 13 years ago by scottcorgan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install feedback 
SYNC missed versions from official npm registry.

feedback

Fancier console.log for Node.js cli apps

Install

npm install feedback --save

Usage

var feedback = require('feedback');

// Strips all color from output
feedback.color = false;

//
feeback.write('message') // same as process.stdout
feedback.writeln('message') // same as write() but begins with a new line
feedback.info('message') // same as console.log()
feedback.success('message') // same as console.log(), but adds "Success: " to beginning
feedback.warn('message') // same as console.log(), but adds "Warning: " to beginning
feedback.error('message') // 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 = require('feedback');

feedback.test = true;
feedback.success('Muted message'); // This message won't get printed to the bash

feedback.on('write', function (msg) {
  // Still have access each time a message 
  // should have been written to the bash.
});

Run tests

npm install
npm test

Current Tags

  • 0.3.2                                ...           latest (13 years ago)

7 Versions

  • 0.3.2                                ...           13 years ago
  • 0.3.1                                ...           13 years ago
  • 0.3.0                                ...           13 years ago
  • 0.2.0                                ...           13 years ago
  • 0.1.2                                ...           13 years ago
  • 0.1.1                                ...           13 years ago
  • 0.0.0                                ...           13 years ago
Maintainers (1)
Downloads
Total 18
Today 0
This Week 6
This Month 18
Last Day 0
Last Week 12
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE