Socket
Socket
Sign inDemoInstall

algoliasearch-helper

Package Overview
Dependencies
Maintainers
3
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

algoliasearch-helper - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

bower.json
{
"name": "algoliasearch-helper",
"version": "2.1.0",
"version": "2.1.1",
"homepage": "https://github.com/algolia/algoliasearch-helper-js",

@@ -5,0 +5,0 @@ "authors": [

@@ -38,3 +38,3 @@ "use strict";

*/
algoliasearchHelper.version = "2.1.0";
algoliasearchHelper.version = "2.1.1";

@@ -41,0 +41,0 @@ /**

{
"name": "algoliasearch-helper",
"version": "2.1.0",
"version": "2.1.1",
"description": "Helper for implementing advanced search features with algolia",

@@ -18,11 +18,6 @@ "main": "index.js",

"doc:watch" : "onchange 'src/**/*.js' 'index.js' -- npm run doc",
"publish-doc": "git checkout gh-pages && git merge master && npm run build && npm run doc && git commit -a -m 'Update doc' && git push origin gh-pages && git checkout master",
"publish-doc": "git checkout gh-pages && git merge master && npm run build && npm run doc && git add docs dist && git commit -a -m 'Update doc' && git push origin gh-pages && git checkout master",
"test-ci": "echo \"Error: no test specified\" && exit 1",
"test": "echo \"Error: no test specified\" && exit 1"
},
"browserify": {
"transform": [
"envify"
]
},
"author": {

@@ -29,0 +24,0 @@ "name": "Algolia SAS",

@@ -533,2 +533,3 @@ "use strict";

AlgoliaSearchHelper.prototype._getHitsSearchParams = function() {
var query = this.state.query;
var facets = this.state.facets.concat( this.state.disjunctiveFacets );

@@ -541,6 +542,6 @@ var facetFilters = this._getFacetFilters();

tagFilters : tagFilters,
distinct : this.state.distinct || false
distinct : this.state.distinct
};
if( !this.state.query && facetFilters.length === 0 && numericFilters.length === 0 && tagFilters.length === 0 ) {
if( !this.containsRefinement( query, facetFilters, numericFilters, tagFilters ) ) {
additionalParams.distinct = false;

@@ -567,2 +568,3 @@ }

AlgoliaSearchHelper.prototype._getDisjunctiveFacetSearchParams = function( facet ) {
var query = this.state.query;
var facetFilters = this._getFacetFilters( facet );

@@ -579,6 +581,6 @@ var numericFilters = this._getNumericFilters( facet );

tagFilters : tagFilters,
distinct : this.state.distinct || false
distinct : this.state.distinct
};
if( !this.state.query && facetFilters.length === 0 && numericFilters.length === 0 && tagFilters.length === 0 ) {
if( !this.containsRefinement( query, facetFilters, numericFilters, tagFilters ) ) {
additionalParams.distinct = false;

@@ -598,2 +600,9 @@ }

AlgoliaSearchHelper.prototype.containsRefinement = function( query, facetFilters, numericFilters, tagFilters ) {
return query ||
facetFilters.length !== 0 ||
numericFilters.length !== 0 ||
tagFilters.length !== 0;
};
/**

@@ -600,0 +609,0 @@ * Return the numeric filters in an algolia request fashion

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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