mongoose-query-parser
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -109,3 +109,3 @@ "use strict"; | ||
var parser = new _1.MongooseQueryParser(); | ||
var qry = '_id=1&populate=p1,p2:p3.p4,p2:p3.p5,p6:p7'; | ||
var qry = '_id=1&populate=p1,p2:p3.p4,p2:p3:p5,p6:p7'; | ||
var parsed = parser.parse(qry); | ||
@@ -119,3 +119,3 @@ chai_1.assert.isNotEmpty(parsed.populate); | ||
chai_1.assert.isTrue(p.populate.select.includes('p4')); | ||
chai_1.assert.isTrue(p.populate.select.includes('p5')); | ||
chai_1.assert.isTrue(p.populate.populate.path === 'p5'); | ||
} | ||
@@ -122,0 +122,0 @@ if (p.path === 'p6') { |
{ | ||
"name": "mongoose-query-parser", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Convert url query string to MongooseJs friendly query object including advanced filtering, sorting, population, string template, type casting and many more...", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -107,6 +107,6 @@ # mongoose-query-parser | ||
- Useful to populate sub-document(s) in query. Works with `MongooseJS`. Please see [Mongoose Populate](http://mongoosejs.com/docs/populate.html) for more details | ||
- Supports deep populate with delimiter ":" | ||
- Supports deep populate with delimiter ":" to indicate deep populate | ||
- Below example & `test-populate.spec.ts` for more details | ||
- See [Mongoose Docs](https://mongoosejs.com/docs/populate.html#deep-populate) | ||
- Allows to populate with only selected fields | ||
- Allows to populate with only selected fields with "." to indicate field selection | ||
- Default operator key is `populate` | ||
@@ -121,3 +121,4 @@ | ||
// populate: { | ||
// path: 'name', | ||
// path: 'friends', | ||
// select: 'name', | ||
// } | ||
@@ -124,0 +125,0 @@ // }, { |
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
61646
337