inv-loggers
Advanced tools
Comparing version 3.3.11 to 3.3.12
const chalk = require('tiny-chalk') | ||
const { grey } = chalk | ||
const { inspect } = require('util') | ||
const print = str => process.stdout.write(str + '\n') | ||
const log = (obj, label, color = 'cyan') => { | ||
if ((typeof obj === 'string') && (label == null)) { | ||
console.log(chalk[color](obj)) | ||
print(chalk[color](obj)) | ||
return obj | ||
@@ -13,5 +14,5 @@ } else { | ||
if (label != null) { | ||
console.log(grey('****** ') + chalk[color](label.toString()) + grey(' ******')) | ||
print(grey('****** ') + chalk[color](label.toString()) + grey(' ******')) | ||
} else { | ||
console.log(chalk[color]('******************************')) | ||
print(chalk[color]('******************************')) | ||
} | ||
@@ -25,7 +26,7 @@ let objCopy = obj | ||
} | ||
console.log(objCopy) | ||
print(objCopy) | ||
if (context != null) { | ||
console.log('Context: ', inspect(context, { depth: 10 })) | ||
print('Context: ', inspect(context, { depth: 10 })) | ||
} | ||
console.log(grey('-----')) | ||
print(grey('-----')) | ||
return obj | ||
@@ -32,0 +33,0 @@ } |
{ | ||
"name": "inv-loggers", | ||
"version": "3.3.11", | ||
"version": "3.3.12", | ||
"description": "loggers and partial loggers", | ||
@@ -8,3 +8,4 @@ "main": "inv-loggers.js", | ||
"test": "mocha", | ||
"prepublish": "npm test" | ||
"prepublish": "npm test", | ||
"postpublish": "git push --tags" | ||
}, | ||
@@ -11,0 +12,0 @@ "files": [ |
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
5757
55