Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongoose-query-parser

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-query-parser - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

4

lib/test.spec.js

@@ -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 @@ // }, {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc