Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

feedback

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feedback

Fancier console.log for Node.js cli apps

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
336
decreased by-86.13%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 05 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc