inv-loggers
Advanced tools
Comparing version 3.1.1 to 3.2.0
// 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); |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
52749
1
1
99
0
8
56
- Removedlodash.assign@^3.2.0
- Removedlodash.partialright@^3.1.1
- Removedlodash._baseassign@3.2.0(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._bindcallback@3.0.1(transitive)
- Removedlodash._createassigner@3.1.1(transitive)
- Removedlodash._createwrapper@3.2.0(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._replaceholders@3.0.0(transitive)
- Removedlodash._root@3.0.1(transitive)
- Removedlodash.assign@3.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.partialright@3.1.1(transitive)
- Removedlodash.restparam@3.6.1(transitive)