viewmodel
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -89,9 +89,18 @@ 'use strict'; | ||
vms = _.filter(vms, function(vm) { | ||
var deepFound = deepFind(vm, _.keys(query)[0]); | ||
if (_.isArray(deepFound) && deepFound.length > 0) { | ||
return true; | ||
} else if (deepFound === _.values(query)[0]) { | ||
return true; | ||
var keys = _.keys(query); | ||
var values = _.values(query); | ||
var found = false; | ||
for (var i in keys) { | ||
var key = keys[i]; | ||
var deepFound = deepFind(vm, key); | ||
if (_.isArray(deepFound) && deepFound.length > 0) { | ||
found = true; | ||
} else if (deepFound === values[i]) { | ||
found = true; | ||
} else { | ||
found = false; | ||
break; | ||
} | ||
} | ||
return false; | ||
return found; | ||
}); | ||
@@ -98,0 +107,0 @@ } |
{ | ||
"author": "adrai", | ||
"name": "viewmodel", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -0,1 +1,4 @@ | ||
#### v1.1.1 | ||
- added possibility for inmemory implementation to search with multiple values | ||
#### v1.1.0 | ||
@@ -2,0 +5,0 @@ - added possibility to pass query options |
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
51251
1368