Socket
Socket
Sign inDemoInstall

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.4.1 to 1.4.2

31

lib/databases/elasticsearch.js

@@ -45,2 +45,12 @@ 'use strict';

function getInTerms (query) {
return _(query).keys().filter(function (k) {
return _.isPlainObject(query[k]) && query[k].$in;
}).map(function (k) {
var term = {};
term[k] = query[k].$in;
return { term: term };
}).value();
}
function getRanges (query) {

@@ -214,2 +224,9 @@ return _(query).keys().filter(function (k) {

var orInTerms = getInTerms(ele);
if (orInTerms.length > 0) {
body.query.filtered.filter.or = body.query.filtered.filter.or || [];
body.query.filtered.filter.or = body.query.filtered.filter.or.concat(orInTerms);
}
var orRanges = getRanges(ele);

@@ -233,2 +250,9 @@

var andInTerms = getInTerms(ele);
if (andInTerms.length > 0) {
body.query.filtered.filter.and = body.query.filtered.filter.and || [];
body.query.filtered.filter.and = body.query.filtered.filter.and.concat(andInTerms);
}
var andRanges = getRanges(ele);

@@ -249,2 +273,9 @@

var inTerms = getInTerms(query);
if (inTerms.length > 0) {
body.query.filtered.filter.and = body.query.filtered.filter.and || [];
body.query.filtered.filter.and = body.query.filtered.filter.and.concat(inTerms);
}
var ranges = getRanges(query);

@@ -251,0 +282,0 @@

6

package.json
{
"author": "adrai",
"name": "viewmodel",
"version": "1.4.1",
"version": "1.4.2",
"private": false,

@@ -14,3 +14,3 @@ "main": "index.js",

"dependencies": {
"async": "1.3.0",
"async": "1.4.0",
"dotty": "0.0.2",

@@ -20,3 +20,3 @@ "jsondate": "0.0.1",

"node-uuid": "1.4.3",
"sift": "2.0.0",
"sift": "2.0.3",
"tolerance": "1.0.0"

@@ -23,0 +23,0 @@ },

@@ -1,2 +0,2 @@

## [v1.4.1](https://github.com/adrai/node-viewmodel/compare/v1.3.4...v1.4.1)
## [v1.4.2](https://github.com/adrai/node-viewmodel/compare/v1.3.4...v1.4.2)
- added elasticsearch support

@@ -3,0 +3,0 @@

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