redux-cli-logger
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -79,3 +79,6 @@ 'use strict'; | ||
var message = downArrow + ' action ' + action.type + ' @ ' + time.getHours() + ':' + time.getMinutes() + ':' + time.getSeconds(); | ||
var h = padLeft(time.getHours(), 2, "0"); | ||
var m = padLeft(time.getMinutes(), 2, "0"); | ||
var s = padLeft(time.getSeconds(), 2, "0"); | ||
var message = downArrow + ' action ' + action.type + ' @ ' + h + ':' + m + ':' + s; | ||
@@ -89,2 +92,10 @@ var output = colors[messageColor](message) + '\n' + (' ' + colors[prevColor]('prev state\n' + prevState)) + (' ' + colors[actionColor]('action\n' + actionDisplay)) + (' ' + colors[nextColor]('next\n' + nextState)); | ||
}; | ||
} | ||
function padLeft(input, len, filler) { | ||
var output = "" + input; | ||
while (output.length < len) { | ||
output = filler + output; | ||
} | ||
return output; | ||
} |
{ | ||
"name": "redux-cli-logger", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Redux logger for a node environment", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -59,3 +59,6 @@ 'use strict' | ||
const message = `${downArrow} action ${action.type} @ ${time.getHours()}:${time.getMinutes()}:${time.getSeconds()}` | ||
const h = padLeft(time.getHours(), 2, "0"); | ||
const m = padLeft(time.getMinutes(), 2, "0"); | ||
const s = padLeft(time.getSeconds(), 2, "0"); | ||
const message = `${downArrow} action ${action.type} @ ${h}:${m}:${s}` | ||
@@ -71,1 +74,9 @@ const output = `${colors[messageColor](message)}\n` + | ||
} | ||
function padLeft(input, len, filler) { | ||
var output = ""+input; | ||
while (output.length < len) { | ||
output = filler + output; | ||
} | ||
return output; | ||
} |
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
8678
150