Comparing version 0.2.17 to 0.2.18
@@ -68,8 +68,8 @@ /*! | ||
+ ' <head>\n' | ||
+ ' <meta name="renderer" content="webkit"/>\n' | ||
+ ' <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>\n' | ||
+ ' <meta content="text/html; charset=utf-8" http-equiv="content-type"/>\n' | ||
+ ' <meta name="renderer" content="webkit" />\n' | ||
+ ' <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />\n' | ||
+ ' <meta content="text/html; charset=utf-8" http-equiv="content-type" />\n' | ||
+ ' <title>' + dir + '</title>\n' | ||
+ ' <style>\n' | ||
+ ' html, body, p{\n' | ||
+ ' html, body, p {\n' | ||
+ ' margin: 0; padding: 0;\n' | ||
@@ -118,8 +118,8 @@ + ' font-family: "Lucida Console", Consolas, "Liberation Mono", Menlo, Courier, monospace;\n' | ||
+ ' <head>\n' | ||
+ ' <meta name="renderer" content="webkit"/>\n' | ||
+ ' <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>\n' | ||
+ ' <meta content="text/html; charset=utf-8" http-equiv="content-type"/>\n' | ||
+ ' <meta name="renderer" content="webkit" />\n' | ||
+ ' <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />\n' | ||
+ ' <meta content="text/html; charset=utf-8" http-equiv="content-type" />\n' | ||
+ ' <title>' + statusCode + '</title>\n' | ||
+ ' <style>\n' | ||
+ ' html, body, div, p{\n' | ||
+ ' html, body, div, p {\n' | ||
+ ' margin: 0; padding: 0;\n' | ||
@@ -150,3 +150,3 @@ + ' text-align: center;\n' | ||
log: function(data) { | ||
var date = util.dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'); | ||
var date = util.dateFormat(new Date()); | ||
var message = colors.green.bold('[' + date + '] '); | ||
@@ -153,0 +153,0 @@ |
@@ -223,7 +223,7 @@ /*! | ||
/** | ||
* Date format | ||
* Simple date format | ||
* | ||
* @param date | ||
* @param format | ||
* @returns {*} | ||
* @returns {String} | ||
*/ | ||
@@ -235,29 +235,28 @@ dateFormat: function(date, format) { | ||
format = format || 'yyyy-MM-dd hh:mm:ss'; | ||
format = format || 'YYYY-MM-DD hh:mm:ss'; | ||
var map = { | ||
'Y': date.getFullYear(), // Year | ||
'M': date.getMonth() + 1, // Month | ||
'd': date.getDate(), // Date | ||
'D': date.getDate(), // Date | ||
'h': date.getHours(), // Hours | ||
'm': date.getMinutes(), // Minutes | ||
's': date.getSeconds(), // Seconds | ||
'q': Math.floor((date.getMonth() + 3) / 3), // Quarter | ||
'S': date.getMilliseconds() // Milliseconds | ||
's': date.getSeconds() // Seconds | ||
}; | ||
format = format.replace(/([yMdhmsqS])+/g, function(all, t) { | ||
var v = map[t]; | ||
format = format.replace(/([YMDhms])+/g, function(matched, key) { | ||
var value = map[key]; | ||
if (v !== undefined) { | ||
if (all.length > 1) { | ||
v = '0' + v; | ||
v = v.substr(v.length - 2); | ||
if (key === 'Y') { | ||
return String(value).substr(Math.max(0, 4 - matched.length)); | ||
} else { | ||
if (matched.length > 1) { | ||
value = '0' + value; | ||
value = value.substr(value.length - 2); | ||
} | ||
return v; | ||
} else if (t === 'y') { | ||
return (date.getFullYear() + '').substr(4 - all.length); | ||
return value; | ||
} | ||
return all; | ||
return matched; | ||
}); | ||
@@ -264,0 +263,0 @@ |
{ | ||
"name": "fengine", | ||
"version": "0.2.17", | ||
"version": "0.2.18", | ||
"description": "A development tool for f2e", | ||
@@ -5,0 +5,0 @@ "author": { |
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
115498
1555