Comparing version 0.1.4 to 0.1.5
12
index.js
@@ -53,3 +53,3 @@ var fs = require('fs'); | ||
if(logToConsole) { | ||
console.log(typeof decorator == 'function' ? decorator(entry) : entry); | ||
console.log(typeof decorator == 'function' ? decorator(entry) : entry); | ||
} | ||
@@ -60,6 +60,14 @@ }; | ||
function getCurrentDateString() { | ||
return Date(); | ||
var now = new Date(); | ||
return pad2(now.getMonth() + 1) + '-' + pad2(now.getDate()) + '-' + | ||
now.getFullYear() + ' ' + pad2(now.getHours()) + ':' + | ||
pad2(now.getMinutes()) + ':' + pad2(now.getSeconds()) | ||
} | ||
function pad2(num) { | ||
var num = String(num); | ||
return num.length == 1 ? '0' + num: num; | ||
} | ||
return logger; | ||
} |
{ | ||
"name": "elecpen", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "a simple logger", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha" | ||
"test": "node_modules/.bin/mocha" | ||
}, | ||
@@ -24,3 +24,6 @@ "repository": { | ||
"chalk": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^2.2.5" | ||
} | ||
} |
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
6892
107
1