🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

pelias-query

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pelias-query - npm Package Compare versions

Comparing version

to
1.3.0

14

layout/FilteredBooleanQuery.js

@@ -14,3 +14,3 @@

Layout.prototype.filter = function( view ){
this._filter.push([ view, 'must' ]);
this._filter.push( view );
return this;

@@ -43,11 +43,9 @@ };

if( this._filter.length ){
q.query.filtered.filter = { bool: {} };
this._filter.forEach( function( condition ){
var view = condition[0], operator = condition[1];
if( !q.query.filtered.filter.bool.hasOwnProperty( operator ) ){
q.query.filtered.filter.bool[ operator ] = [];
}
this._filter.forEach( function( view ){
var rendered = view( vs );
if( rendered ){
q.query.filtered.filter.bool[ operator ].push( rendered );
if( !q.query.filtered.hasOwnProperty( 'filter' ) ){
q.query.filtered.filter = { bool: { must: [] } };
}
q.query.filtered.filter.bool.must.push( rendered );
}

@@ -54,0 +52,0 @@ });

{
"name": "pelias-query",
"version": "1.2.0",
"version": "1.3.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",