mongoose-query-parser
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -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), |
{ | ||
"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: { |
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
46157
815
330