waterline-criteria
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -10,3 +10,3 @@ /** | ||
* Apply a(nother) `where` filter to `data` | ||
* | ||
* | ||
* @param { Object[] } data | ||
@@ -32,3 +32,3 @@ * @param { Object } where | ||
/// \/ | ||
/// | ||
/// | ||
////////////////////////// | ||
@@ -89,2 +89,16 @@ | ||
else if (key === 'not' || key === '!') { | ||
// Check for Not In | ||
if(Array.isArray(criterion)) { | ||
var match = false; | ||
criterion.forEach(function(val) { | ||
if(compare['='](model[parentKey], val)) { | ||
match = true; | ||
} | ||
}); | ||
return match ? false : true; | ||
} | ||
return matchLiteral(model,parentKey,criterion, compare['!']); | ||
@@ -179,3 +193,3 @@ } | ||
} | ||
// Stringify for comparisons- except for numbers, null, and undefined | ||
@@ -182,0 +196,0 @@ if (!_.isNumber(a)) { |
{ | ||
"name": "waterline-criteria", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "Utility library for use in Sails adapters where you need to filter a list of output using a criteria object", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17949
529
0