Comparing version 0.1.37 to 0.1.39
@@ -93,5 +93,5 @@ var _ = require('underscore'), | ||
if(self.model.schema.paths[query_key].options.type == Boolean) | ||
query_value = query_value.toLowerCase().trim() == 'true'; | ||
query_value = typeof(query_value) == 'string' ? query_value.toLowerCase().trim() == 'true' : !!query_value; | ||
if(self.model.schema.paths[query_key].options.type == Number) | ||
query_value = Number(query_value.trim()); | ||
query_value = typeof(query_value) == 'string' ? Number(query_value.trim()) : Number(query_value); | ||
} | ||
@@ -98,0 +98,0 @@ if(query_op) |
{ | ||
"name": "jest", | ||
"description": "JavaScriptational State Transfer. JS restful API layer with Mongoose based resources. Inspired by python Tastypie", | ||
"version": "0.1.37", | ||
"version": "0.1.39", | ||
"author": "Ishai Jaffe <ishai@empeeric.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -706,3 +706,3 @@ var _ = require('underscore'), | ||
if(operand == 'endswith') { | ||
filters[field.replace('__endswith','')] = new RegExp(this.escape_regex(filters[field] + '$')); | ||
filters[field.replace('__endswith','')] = new RegExp(this.escape_regex(filters[field]) + '$'); | ||
delete filters[field]; | ||
@@ -723,3 +723,3 @@ } | ||
if(operand == 'iendswith') { | ||
filters[field.replace('__iendswith','')] = new RegExp(this.escape_regex(filters[field] + '$'),'i'); | ||
filters[field.replace('__iendswith','')] = new RegExp(this.escape_regex(filters[field]) + '$','i'); | ||
delete filters[field]; | ||
@@ -726,0 +726,0 @@ } |
68350