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 - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

35

index.js

@@ -1,2 +0,2 @@

require('colors');
var colors = require('colors');

@@ -8,6 +8,15 @@ var feedback = {

color: true,
colorFix: function(msg) {
if(feedback.color) { return msg; }
return colors.stripColors(msg);
},
write: function (msg) {
msg = msg || '';
process.stdout.write(feedback._msg(msg));
process.stdout.write(
feedback.colorFix(feedback._msg(msg))
);
return this;

@@ -17,3 +26,5 @@ },

writeln: function (msg) {
feedback.write('\n' + feedback._msg(msg));
feedback.write(
feedback.colorFix('\n' + feedback._msg(msg))
);
return this;

@@ -23,7 +34,11 @@ },

info: function (msg) {
return console.log(feedback._msg(msg));
return console.log(
feedback.colorFix(feedback._msg(msg))
);
},
success: function (msg) {
return console.log('Success:'.green + ' ' + feedback._msg(msg));
return console.log(
feedback.colorFix('Success:'.green + ' ' + feedback._msg(msg))
);
},

@@ -33,3 +48,5 @@

msg = msg || '';
return console.log('Warning:'.yellow + ' ' + feedback._msg(msg));
return console.log(
feedback.colorFix('Warning:'.yellow + ' ' + feedback._msg(msg))
);
},

@@ -39,6 +56,8 @@

msg = msg || '';
return console.log('Error:'.red + ' ' + feedback._msg(msg));
return console.log(
feedback.colorFix('Error:'.red + ' ' + feedback._msg(msg))
);
}
};
module.exports = feedback;
module.exports = feedback;
{
"name": "feedback",
"version": "0.1.2",
"version": "0.2.0",
"description": "Fancier console.log for Node.js cli apps",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -17,2 +17,6 @@ feedback

// Strips all color from output
feedback.color = false;
//
feeback.write('message') // same as process.stdout

@@ -19,0 +23,0 @@ feedback.writeln('message') // same as write() but begins with a new line

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