chaosrouter
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -7,10 +7,22 @@ | ||
var validationlib = { | ||
"is_digit": function(value, kwargs) { | ||
return value.isdigit(); | ||
"is_digit": function(cb, args, kwargs) { | ||
for (var i in args) { | ||
if (! args[i].isdigit()) | ||
return cb(false); | ||
} | ||
cb(true); | ||
}, | ||
"is_number": function(value, kwargs) { | ||
return value.is_number(); | ||
"is_number": function(cb, args, kwargs) { | ||
for (var i in args) { | ||
if (! args[args].is_number()) | ||
return cb(false); | ||
} | ||
cb(true); | ||
}, | ||
"not_empty": function(value, kwargs) { | ||
return value.strip() !== ""; | ||
"not_empty": function(cb, args, kwargs) { | ||
for (var i in args) { | ||
if(! args[i].strip() !== "") | ||
return cb(false); | ||
} | ||
cb(true); | ||
} | ||
@@ -77,3 +89,3 @@ } | ||
data = parents.pop()[1]; | ||
return; | ||
continue; | ||
} | ||
@@ -205,4 +217,6 @@ | ||
var where = ''; | ||
else | ||
else { | ||
this.where = fill(this.where, this.args); | ||
var where = " WHERE {0} ".format(this.where); | ||
} | ||
var query = " SELECT * FROM {table}{join}{where} ".format({ | ||
@@ -260,2 +274,5 @@ 'table': this.table, | ||
self.db.all(query, function(err, all) { | ||
if( all === undefined ) { | ||
return r(err) | ||
} | ||
var result = structure === null | ||
@@ -262,0 +279,0 @@ ? all |
{ | ||
"name": "chaosrouter", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "ERROR: No README data found!", | ||
@@ -5,0 +5,0 @@ "main": "chaosrouter.js", |
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
8015
278