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.1.8 to 1.1.9

13

lib/test.spec.js

@@ -65,2 +65,9 @@ "use strict";

};
Tester.prototype.blacklistTest = function () {
var parser = new _1.MongooseQueryParser({ blacklist: ['apiKey'] });
var qry = "id=some-id-here&apiKey=e9117e5c-c405-489b-9c12-d9f398c7a112";
var parsed = parser.parse(qry);
chai_1.assert.exists(parsed.filter);
chai_1.assert.notExists(parsed.filter.apiKey);
};
Tester.prototype.customDateFormatParse = function () {

@@ -172,2 +179,8 @@ var parser = new _1.MongooseQueryParser({ dateFormat: ['yyyyMMdd', 'yyyy-MM-dd'] });

__decorate([
mocha_1.test('should not show black listed property in filter'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], Tester.prototype, "blacklistTest", null);
__decorate([
mocha_1.test('should parse dates with custom formats'),

@@ -174,0 +187,0 @@ __metadata("design:type", Function),

2

package.json
{
"name": "mongoose-query-parser",
"version": "1.1.8",
"version": "1.1.9",
"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",

@@ -291,5 +291,4 @@ # mongoose-query-parser

```js
parser.parse('id=e9117e5c-c405-489b-9c12-d9f398c7a112&apiKey=foobar', {
blacklist: ['apiKey']
});
const parser = new MongooseQueryParser({ blacklist: ['apiKey'] });
parser.parse('id=e9117e5c-c405-489b-9c12-d9f398c7a112&apiKey=foobar');
// {

@@ -296,0 +295,0 @@ // filter: {

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