mongo-query-builder-chain
Advanced tools
Comparing version 1.0.0 to 1.0.1
var helpers = require('./helpers'); | ||
class MongoQuery { | ||
body; | ||
keyTypePairs = []; | ||
constructor(body = {query: {}}) { | ||
constructor(body = {query: {}}, keyTypePairs = []) { | ||
if (body.query) { | ||
@@ -18,2 +15,8 @@ this.body = { | ||
} | ||
if (Array.isArray(keyTypePairs)) { | ||
this.keyTypePairs = keyTypePairs; | ||
} else { | ||
throw "Argument keyTypePairs must be an array!"; | ||
} | ||
} | ||
@@ -20,0 +23,0 @@ |
@@ -16,3 +16,3 @@ { | ||
"type": "module", | ||
"version": "1.0.0" | ||
"version": "1.0.1" | ||
} |
Sorry, the diff of this file is not supported yet
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
16543
269