mongoose-query-maker
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -59,3 +59,3 @@ "use strict"; | ||
const skip = (page - 1) * limit; | ||
const sort = q.sort || "createdAt"; | ||
const sort = q.sort ? q.sort.replace(/,/g, " ") : "createdAt"; | ||
return { page, limit, skip, sort }; | ||
@@ -62,0 +62,0 @@ }; |
{ | ||
"name": "mongoose-query-maker", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A powerful query maker for MongoDB with Mongoose", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -108,3 +108,3 @@ # Mongoose Query Maker | ||
```json | ||
{ "description": { "$regex": new RegExp("pattern", "flags") } } | ||
{ "description": { "$regex": /pattern/<flags> } } | ||
``` | ||
@@ -111,0 +111,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
70882