handler-logger
Advanced tools
Comparing version 1.0.0 to 1.0.1
20
index.js
@@ -6,2 +6,20 @@ const chalk = require('chalk'); | ||
colorsArray = ["green", "orange", "blue", "red"] | ||
function log(content) { | ||
write(content, 'black', 'bgBlue', 'LOG', true); | ||
} | ||
function custom(type, content, color) { | ||
if(!colorsArray.includes(color)) return error("Color don't match with red, blue, yellow and green !") | ||
if(color === "red") color = 'bgRed' | ||
if(color === "blue") color = 'bgBlue' | ||
if(color === "orange") color = 'bgYellow' | ||
if(color === "green") color = 'bgGreen' | ||
if(!color) return error("Color is empty !") | ||
if(!content) return error("Content is empty !") | ||
if(!type) return error("Type is empty !") | ||
write(content, 'black', color, type, true); | ||
} | ||
function error(content) { | ||
@@ -52,2 +70,2 @@ write(content, 'black', 'bgRed', 'ERROR', true); | ||
module.exports = { error, warn, command, event, typo, client, db, slash }; | ||
module.exports = { custom, log, error, warn, command, event, typo, client, db, slash }; |
{ | ||
"name": "handler-logger", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A handler logger module with color", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
2351
53
2