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

inv-loggers

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inv-loggers - npm Package Compare versions

Comparing version 3.1.1 to 3.2.0

README.md

66

build/inv-loggers.js
// Generated by CoffeeScript 1.10.0
(function() {
module.exports = require('./lib/loggers')();
var log, logs_, partialLogger;
require('colors');
log = function(obj, label, color) {
if (color == null) {
color = 'cyan';
}
if (typeof obj === 'string' && (label == null)) {
console.log(obj[color]);
return obj;
} else {
if (label != null) {
console.log("****** ".grey + label.toString()[color] + " ******".grey);
} else {
console.log("******************************"[color]);
}
console.log(obj);
console.log("-----".grey);
return obj;
}
};
logs_ = {
log: log,
error: function(err, label) {
log(err.stack || err, label, 'red');
},
success: function(obj, label) {
return log(obj, label, 'green');
},
info: function(obj, label) {
return log(obj, label, 'blue');
},
warn: function(obj, label) {
log(obj, label, 'yellow');
}
};
logs_.errorRethrow = function(err, label) {
logs_.error(err, label);
throw err;
};
partialLogger = function(logger) {
return function(label) {
return function(obj) {
return logger(obj, label);
};
};
};
logs_.Log = partialLogger(logs_.log);
logs_.Error = partialLogger(logs_.error);
logs_.Warn = partialLogger(logs_.warn);
logs_.Info = partialLogger(logs_.info);
logs_.Success = partialLogger(logs_.success);
logs_.ErrorRethrow = partialLogger(logs_.errorRethrow);
module.exports = logs_;
}).call(this);

10

package.json
{
"name": "inv-loggers",
"version": "3.1.1",
"version": "3.2.0",
"description": "loggers and partial loggers",

@@ -21,5 +21,3 @@ "main": "./build/inv-loggers.js",

"dependencies": {
"colors": "^1.1.2",
"lodash.assign": "^3.2.0",
"lodash.partialright": "^3.1.1"
"colors": "^1.1.2"
},

@@ -29,3 +27,7 @@ "devDependencies": {

"should": "^7.0.4"
},
"repository": {
"type": "git",
"url": "https://github.com/inventaire/inv-loggers"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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