Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

viewmodel

Package Overview
Dependencies
Maintainers
2
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

viewmodel - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

21

lib/databases/inmemory.js

@@ -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

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