Comparing version 2.0.18 to 2.0.19
@@ -24,3 +24,3 @@ | ||
var jul = new Date(fullYear, 6, 1); | ||
return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()) * 60000; | ||
return Math.min(jan.getTimezoneOffset(), jul.getTimezoneOffset()) * 60000; | ||
} | ||
@@ -59,3 +59,15 @@ | ||
case 'string': | ||
output.push(Style(Style.WHITE, msg)); | ||
var length = msg.length; | ||
if (length && msg[0] === '(' && msg[length - 1] === ')') { | ||
output.push(Style(Style.CYAN, msg.substring(1, length - 1))); | ||
} else if (length && msg[0] === '[' && msg[length - 1] === ']') { | ||
output.push(Style(Style.BLUE, msg.substring(1, length - 1))); | ||
} else if (length && msg[0] === '{' && msg[length - 1] === '}') { | ||
output.push(Style(Style.MAGENTA, msg.substring(1, length - 1))); | ||
} else if (length && msg.substr(0, 7) === 'http://') { | ||
output.push(Style(Style.UNDERLINE, msg)); | ||
} else { | ||
output.push(Style(Style.WHITE, msg)); | ||
} | ||
break; | ||
@@ -62,0 +74,0 @@ case 'number': |
@@ -16,2 +16,4 @@ module.exports = function color(color, text) { | ||
module.exports.UNDERLINE = '\033[4m'; | ||
module.exports.GREY_BOLD = '\x1B[1;30m'; | ||
@@ -18,0 +20,0 @@ module.exports.RED_BOLD = '\x1B[1;31m'; |
{ | ||
"name": "logging", | ||
"version": "2.0.18", | ||
"version": "2.0.19", | ||
"description": "Super sexy color console logging with cluster support.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/dylang/logging", |
Sorry, the diff of this file is not supported yet
38904
19
187