Comparing version 0.1.14 to 0.1.15
@@ -102,2 +102,9 @@ var fs = require("fs"); | ||
/** | ||
* 是否是日期 | ||
* @return {Boolean} [description] | ||
*/ | ||
global.is_date = function(){ | ||
return Object.prototype.toString.call(obj) == '[object Date]'; | ||
} | ||
/** | ||
* 是否是个错误 | ||
@@ -104,0 +111,0 @@ * @param {[type]} obj [description] |
@@ -83,3 +83,3 @@ /** | ||
if (item.indexOf(':') === 0) { | ||
if (item.indexOf('\\')) { | ||
if (item.indexOf('\\') > -1) { | ||
var type = item.substr(-1); | ||
@@ -86,0 +86,0 @@ if (type == 'd' && !is_number(pathname[i])) { |
@@ -120,3 +120,6 @@ var url = require("url"); | ||
}else{ | ||
value = value.map(this.parseValue); | ||
var self = this; | ||
value = value.map(function(item){ | ||
return self.parseValue(item); | ||
}); | ||
} | ||
@@ -123,0 +126,0 @@ }else if(is_boolean(value)){ |
@@ -40,3 +40,3 @@ var url = require("url"); | ||
if (groupList.length) { | ||
if (groupList.indexOf(paths[0])) { | ||
if (groupList.indexOf(paths[0]) > -1) { | ||
group = paths.shift(); | ||
@@ -47,3 +47,3 @@ }; | ||
if (group && deny.length) { | ||
if (deny.indexOf(_group)) { | ||
if (deny.indexOf(_group) > -1) { | ||
throw_error("favicon.ico", this.http); | ||
@@ -50,0 +50,0 @@ }; |
@@ -173,2 +173,10 @@ /** | ||
return net.isIP(this.field); | ||
}, | ||
/** | ||
* 日期校验 | ||
* @return {[type]} [description] | ||
*/ | ||
date: function(){ | ||
var reg = /^\d{4}-\d{1,2}-\d{1,2}$/; | ||
return this.regexp(reg); | ||
} | ||
@@ -175,0 +183,0 @@ } |
{ | ||
"name": "thinkjs", | ||
"description": "thinkphp web framework for nodejs", | ||
"version": "0.1.14", | ||
"version": "0.1.15", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "welefen", |
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
167251
4992