New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

algoliasearch-helper

Package Overview
Dependencies
Maintainers
7
Versions
153
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.11.1 to 2.12.0

documentation-src/build.gulp.js

2

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

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

@@ -9,3 +9,4 @@ 'use strict';

/**
* The algoliasearchHelper module contains everything needed to use the Algoliasearch
* The algoliasearchHelper module is the function that will let its
* contains everything needed to use the Algoliasearch
* Helper. It is a also a function that instanciate the helper.

@@ -26,5 +27,11 @@ * To use the helper, you also need the Algolia JS client v3.

* .search();
* @example
* // The helper is an event emitter using the node API
* helper.on('result', updateTheResults);
* helper.once('result', updateTheResults);
* helper.removeListener('result', updateTheResults);
* helper.removeAllListeners('result');
* @module algoliasearchHelper
* @param {AlgoliaSearch} client an AlgoliaSearch client
* @param {string} index the index name to query
* @param {string} index the name of the index to query
* @param {SearchParameters|object} opts an object defining the initial config of the search. It doesn't have to be a {SearchParameters}, just an object containing the properties you need from it.

@@ -31,0 +38,0 @@ * @return {AlgoliaSearchHelper}

{
"name": "algoliasearch-helper",
"version": "2.11.1",
"version": "2.12.0",
"description": "Helper for implementing advanced search features with algolia",
"main": "index.js",
"homepage": "https://community.algolia.com/algoliasearch-helper-js/",
"scripts": {

@@ -15,5 +16,4 @@ "watch": "watchify index.js -v -s algoliasearchHelper -o dist/algoliasearch.helper.js",

"examples": "npm run build & npm run open & http-server .",
"doc": "npm run doc:jsdoc",
"doc:jsdoc": "jsdoc -r src index.js -d docs -c .jsdoc --readme README.md",
"doc:watch": "onchange 'src/**/*.js' 'index.js' '../minami/**/*.*' -- npm run doc",
"doc": "gulp --gulpfile documentation-src/build.gulp.js doc",
"doc:watch": "gulp --gulpfile documentation-src/build.gulp.js doc:watch",
"doc:publish": "gh-pages-deploy",

@@ -25,6 +25,6 @@ "readme:toc": "doctoc --notitle README.md --maxlevel 3",

"test:watch": "onchange '{src,test}/**/*.js' 'index.js' -- npm run test-node",
"release": "git clean dist/ -f && git checkout dist/ && npm install && ./scripts/release.js && npm run build",
"shrinkwrap": "npm-shrinkwrap --dev"
"release": "git clean dist/ -f && git checkout dist/ && npm install && ./scripts/release.js && npm run build"
},
"gh-pages-deploy": {
"staticpath": "documentation",
"prep": [

@@ -49,7 +49,7 @@ "doc"

},
"browser": {
"lodash": "lodash-compat"
},
"devDependencies": {
"algoliasearch": "^3.15.0",
"babel-core": "^6.10.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"browserify": "^13.0.1",

@@ -59,2 +59,6 @@ "browzers": "^1.3.0",

"bulkify": "^1.2.0",
"chalk": "^1.1.3",
"collect-json": "^1.0.8",
"dateformat": "^1.0.12",
"dmd": "^1.4.1",
"doctoc": "^0.15.0",

@@ -66,5 +70,25 @@ "envify": "^3.4.0",

"gh-pages-deploy": "^0.3.0",
"gulp": "^3.9.1",
"gulp-cli": "^1.2.1",
"gulp-livereload": "^3.8.1",
"gulp-sass": "^2.3.2",
"handlebars": "^4.0.5",
"http-server": "^0.9.0",
"jsdoc": "bobylito/jsdoc#aecd558f1cd2640bea5348322839b7730165f530",
"minami": "algolia/minami#81c8243b73ed5224dc3ce9fd79aab8bbf8da0488",
"jade": "^1.11.0",
"jsdoc-parse": "^1.2.7",
"jsdoc-to-markdown": "^1.3.6",
"metalsmith": "^2.1.0",
"metalsmith-changed": "^2.0.0",
"metalsmith-discover-partials": "^0.1.0",
"metalsmith-headings": "^0.1.0",
"metalsmith-in-place": "superwolff/metalsmith-in-place#7cb06e54142b8843f35178ceb5560946ae356049",
"metalsmith-layouts": "^1.6.5",
"metalsmith-markdown": "^0.2.1",
"metalsmith-metallic": "^1.0.0",
"metalsmith-packagejson": "^1.0.1",
"metalsmith-sass": "^1.3.0",
"metalsmith-serve": "0.0.7",
"metalsmith-watch": "^1.0.3",
"metalsmith-webpack": "^1.0.3",
"mkdirp": "^0.5.1",
"mversion": "^1.10.1",

@@ -76,7 +100,13 @@ "npm-shrinkwrap": "^200.5.1",

"pretty-bytes": "^2.0.1",
"replace-ext": "0.0.1",
"rimraf": "^2.5.2",
"semver": "^5.1.0",
"sinon": "^1.17.4",
"st": "^1.1.0",
"tape": "^4.5.1",
"uglify-js": "^2.6.2",
"vinyl": "^1.1.1",
"watchify": "^3.7.0",
"webpack": "^1.13.1",
"webpack-stream": "^3.2.0",
"zuul": "^3.10.1",

@@ -87,4 +117,4 @@ "zuul-ngrok": "^4.0.0"

"events": "^1.1.0",
"lodash": "^3.10.1",
"lodash-compat": "^3.10.2",
"lodash": "^4.13.1",
"marked": "^0.3.5",
"qs": "^5.2.0",

@@ -91,0 +121,0 @@ "util": "^0.10.3"

@@ -10,7 +10,7 @@ 'use strict';

var forEach = require('lodash/collection/forEach');
var map = require('lodash/collection/map');
var bind = require('lodash/function/bind');
var isEmpty = require('lodash/lang/isEmpty');
var trim = require('lodash/string/trim');
var forEach = require('lodash/forEach');
var map = require('lodash/map');
var bind = require('lodash/bind');
var isEmpty = require('lodash/isEmpty');
var trim = require('lodash/trim');

@@ -20,2 +20,48 @@ var url = require('./url');

/**
* Event triggered when a parameter is set or updated
* @event AlgoliaSearchHelper#event:change
* @property {SearchParameters} state the current parameters with the latest changes applied
* @property {SearchResults} lastResults the previous results received from Algolia. `null` before
* the first request
* @example
* helper.on('change', function(state, lastResults) {
* console.log('The parameters have changed');
* });
*/
/**
* Event triggered when the search is sent to Algolia
* @event AlgoliaSearchHelper#event:search
* @property {SearchParameters} state the parameters used for this search
* @property {SearchResults} lastResults the results from the previous search. `null` if
* it is the first search.
* @example
* helper.on('search', function(state, lastResults) {
* console.log('Search sent');
* });
*/
/**
* Event triggered when the results are retrieved from Algolia
* @event AlgoliaSearchHelper#event:result
* @property {SearchResults} results the results received from Algolia
* @property {SearchParameters} state the parameters used to query Algolia. Those might
* be different from the one in the helper instance (for example if the network is unreliable).
* @example
* helper.on('result', function(results, state) {
* console.log('Search results received');
* });
*/
/**
* Event triggered when Algolia sends back an error
* @event AlgoliaSearchHelper#event:error
* @property {Error} error the error returned by the Algolia.
* @example
* helper.on('error', function(error) {
* console.log('Houston we got a problem.');
* });
*/
/**
* Initialize a new AlgoliaSearchHelper

@@ -28,2 +74,3 @@ * @class

* {@link SearchResults} of the last result if any.
* - search: when a search is triggered using the `search()` method.
* - result: when the response is retrieved from Algolia and is processed.

@@ -52,3 +99,6 @@ * This event contains a {@link SearchResults} object and the

/**
* Start the search with the parameters set in the state.
* Start the search with the parameters set in the state. When the
* method is called, it triggers a `search` event. The results will
* be available through the `result` event. If an error occcurs, an
* `error` will be fired instead.
* @return {AlgoliaSearchHelper}

@@ -58,2 +108,3 @@ * @fires search

* @fires error
* @chainable
*/

@@ -74,6 +125,28 @@ AlgoliaSearchHelper.prototype.search = function() {

* server is back.
* @return promise|undefined if a callback is passed the method returns undefined
* @return {promise|undefined} if a callback is passed the method returns undefined
* otherwise it returns a promise containing an object with two keys :
* - content with a SearchResults
* - state with the state used for the query as a SearchParameters
* @example
* // Changing the number of records returned per page to 1
* // This example uses the callback API
* var state = helper.searchOnce({hitsPerPage: 1},
* function(error, content, state) {
* // if an error occured it will be passed in error, otherwise its value is null
* // content contains the results formatted as a SearchResults
* // state is the instance of SearchParameters used for this search
* });
* @example
* // Changing the number of records returned per page to 1
* // This example uses the promise API
* var state1 = helper.searchOnce({hitsPerPage: 1})
* .then(promiseHandler);
*
* function promiseHandler(res) {
* // res contains
* // {
* // content : SearchResults
* // state : SearchParameters (the one used for this specific search)
* // }
* }
*/

@@ -101,6 +174,9 @@ AlgoliaSearchHelper.prototype.searchOnce = function(options, cb) {

/**
* Sets the query. Also sets the current page to 0.
* Sets the text query used for the search.
*
* This method resets the current page to 0.
* @param {string} q the user query
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -114,6 +190,23 @@ AlgoliaSearchHelper.prototype.setQuery = function(q) {

/**
* Remove all refinements (disjunctive + conjunctive + hierarchical + excludes + numeric filters)
* Remove all the types of refinements except tags. A string can be provided to remove
* only the refinements of a specific attribute. For more advanced use case, you can
* provide a function instead. This function should follow the
* [clearCallback definition](#SearchParameters.clearCallback).
*
* This method resets the current page to 0.
* @param {string} [name] optional name of the facet / attribute on which we want to remove all refinements
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
* @example
* // Removing all the refinements
* helper.clearRefinements().search();
* @example
* // Removing all the filters on a the category attribute.
* helper.clearRefinements('category').search();
* @example
* // Removing only the exclude filters on the category facet.
* helper.clearRefinements(function(value, attribute, type) {
* return type === 'exclude' && attribute === 'category';
* }).search();
*/

@@ -127,5 +220,8 @@ AlgoliaSearchHelper.prototype.clearRefinements = function(name) {

/**
* Remove all the tag filtering
* Remove all the tag filters.
*
* This method resets the current page to 0.
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -139,3 +235,6 @@ AlgoliaSearchHelper.prototype.clearTags = function() {

/**
* Ensure a facet refinement exists
* Adds a disjunctive filter to a facetted attribute with the `value` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine

@@ -145,2 +244,3 @@ * @param {string} value the associated value (will be converted to string)

* @fires change
* @chainable
*/

@@ -161,3 +261,6 @@ AlgoliaSearchHelper.prototype.addDisjunctiveFacetRefinement = function(facet, value) {

/**
* Add a numeric refinement on the given attribute
* Adds a an numeric filter to an attribute with the `operator` and `value` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} attribute the attribute on which the numeric filter applies

@@ -168,2 +271,3 @@ * @param {string} operator the operator of the filter

* @fires change
* @chainable
*/

@@ -177,3 +281,6 @@ AlgoliaSearchHelper.prototype.addNumericRefinement = function(attribute, operator, value) {

/**
* Ensure a facet refinement exists
* Adds a filter to a facetted attribute with the `value` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine

@@ -183,2 +290,3 @@ * @param {string} value the associated value (will be converted to string)

* @fires change
* @chainable
*/

@@ -200,3 +308,6 @@ AlgoliaSearchHelper.prototype.addFacetRefinement = function(facet, value) {

/**
* Ensure a facet exclude exists
* Adds a an exclusion filter to a facetted attribute with the `value` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine

@@ -206,2 +317,3 @@ * @param {string} value the associated value (will be converted to string)

* @fires change
* @chainable
*/

@@ -222,6 +334,10 @@ AlgoliaSearchHelper.prototype.addFacetExclusion = function(facet, value) {

/**
* Add a tag refinement
* Adds a tag filter with the `tag` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} tag the tag to add to the filter
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -235,8 +351,18 @@ AlgoliaSearchHelper.prototype.addTag = function(tag) {

/**
* Remove a numeric filter.
* Removes an numeric filter to an attribute with the `operator` and `value` provided. If the
* filter is not set, it doesn't change the filters.
*
* Some parameters are optionnals, triggering different behaviors:
* - if the value is not provided, then all the numeric value will be removed for the
* specified attribute/operator couple.
* - if the operator is not provided either, then all the numeric filter on this attribute
* will be removed.
*
* This method resets the current page to 0.
* @param {string} attribute the attribute on which the numeric filter applies
* @param {string} operator the operator of the filter
* @param {number} value the value of the filter
* @param {string} [operator] the operator of the filter
* @param {number} [value] the value of the filter
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -250,7 +376,14 @@ AlgoliaSearchHelper.prototype.removeNumericRefinement = function(attribute, operator, value) {

/**
* Ensure a facet refinement does not exist
* Removes a disjunctive filter to a facetted attribute with the `value` provided. If the
* filter is not set, it doesn't change the filters.
*
* If the value is omitted, then this method will remove all the filters for the
* attribute.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value
* @param {string} [value] the associated value
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -271,7 +404,14 @@ AlgoliaSearchHelper.prototype.removeDisjunctiveFacetRefinement = function(facet, value) {

/**
* Ensure a facet refinement does not exist
* Removes a filter to a facetted attribute with the `value` provided. If the
* filter is not set, it doesn't change the filters.
*
* If the value is omitted, then this method will remove all the filters for the
* attribute.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value
* @param {string} [value] the associated value
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -292,7 +432,14 @@ AlgoliaSearchHelper.prototype.removeFacetRefinement = function(facet, value) {

/**
* Ensure a facet exclude does not exist
* Removes an exclusion filter to a facetted attribute with the `value` provided. If the
* filter is not set, it doesn't change the filters.
*
* If the value is omitted, then this method will remove all the filters for the
* attribute.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value
* @param {string} [value] the associated value
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -313,6 +460,10 @@ AlgoliaSearchHelper.prototype.removeFacetExclusion = function(facet, value) {

/**
* Ensure that a tag is not filtering the results
* Removes a tag filter with the `tag` provided. If the
* filter is not set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} tag tag to remove from the filter
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -326,3 +477,6 @@ AlgoliaSearchHelper.prototype.removeTag = function(tag) {

/**
* Toggle refinement state of an exclude
* Adds or removes an exclusion filter to a facetted attribute with the `value` provided. If
* the value is set then it removes it, otherwise it adds the filter.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine

@@ -332,2 +486,3 @@ * @param {string} value the associated value

* @fires change
* @chainable
*/

@@ -348,8 +503,14 @@ AlgoliaSearchHelper.prototype.toggleFacetExclusion = function(facet, value) {

/**
* Toggle refinement state of a facet
* Adds or removes a filter to a facetted attribute with the `value` provided. If
* the value is set then it removes it, otherwise it adds the filter.
*
* This method can be used for conjunctive, disjunctive and hierarchical filters.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value
* @return {AlgoliaSearchHelper}
* @throws will throw an error if the facet is not declared in the settings of the helper
* @throws Error will throw an error if the facet is not declared in the settings of the helper
* @fires change
* @chainable
*/

@@ -371,6 +532,10 @@ AlgoliaSearchHelper.prototype.toggleRefinement = function(facet, value) {

/**
* Toggle tag refinement
* Adds or removes a tag filter with the `value` provided. If
* the value is set then it removes it, otherwise it adds the filter.
*
* This method resets the current page to 0.
* @param {string} tag tag to remove or add
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -384,4 +549,9 @@ AlgoliaSearchHelper.prototype.toggleTag = function(tag) {

/**
* Go to next page
* Increments the page number by one.
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
* @example
* helper.setPage(0).nextPage().getPage();
* // returns 1
*/

@@ -393,4 +563,9 @@ AlgoliaSearchHelper.prototype.nextPage = function() {

/**
* Go to previous page
* Decrements the page number by one.
* @fires change
* @return {AlgoliaSearchHelper}
* @chainable
* @example
* helper.setPage(1).previousPage().getPage();
* // returns 0
*/

@@ -401,2 +576,5 @@ AlgoliaSearchHelper.prototype.previousPage = function() {

/**
* @private
*/
function setCurrentPage(page) {

@@ -416,2 +594,3 @@ if (page < 0) throw new Error('Page requested below 0.');

* @fires change
* @chainable
*/

@@ -421,6 +600,8 @@ AlgoliaSearchHelper.prototype.setCurrentPage = setCurrentPage;

/**
* Change the current page
* Updates the current page.
* @function
* @param {number} page The page number
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -430,6 +611,9 @@ AlgoliaSearchHelper.prototype.setPage = setCurrentPage;

/**
* Configure the underlying index name
* Updates the name of the index that will be targeted by the query.
*
* This method resets the current page to 0.
* @param {string} name the index name
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/

@@ -443,3 +627,10 @@ AlgoliaSearchHelper.prototype.setIndex = function(name) {

/**
* Update any single parameter of the state/configuration (based on SearchParameters).
* Update a parameter of the search. This method reset the page
*
* The complete list of parameters is available on the
* [Algolia website](https://www.algolia.com/doc/rest#query-an-index).
* The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts)
* or benefit from higher-level APIs (all the kind of filters and facets have their own API)
*
* This method resets the current page to 0.
* @param {string} parameter name of the parameter to update

@@ -449,2 +640,5 @@ * @param {any} value new value of the parameter

* @fires change
* @chainable
* @example
* helper.setQueryParameter('hitsPerPage', 20).search();
*/

@@ -466,2 +660,3 @@ AlgoliaSearchHelper.prototype.setQueryParameter = function(parameter, value) {

* @fires change
* @chainable
*/

@@ -481,2 +676,5 @@ AlgoliaSearchHelper.prototype.setState = function(newState) {

* @example
* // Get the complete state as stored in the helper
* helper.getState();
* @example
* // Get a part of the state with all the refinements on attributes and the query

@@ -494,6 +692,10 @@ * helper.getState(['query', 'attribute:category']);

* @param {object} [options] May contain the following parameters :
* - filters : possible values are all the keys of the {SearchParameters}, 'index' for the index,
* all the refinements with 'attribute:*' or for some specific attributes with 'attribute:theAttribute'
* - prefix : prefix in front of the keys
* - moreAttributes : more values to be added in the query string. Those values
*
* **filters** : possible values are all the keys of the [SearchParameters](#searchparameters), `index` for
* the index, all the refinements with `attribute:*` or for some specific attributes with
* `attribute:theAttribute`
*
* **prefix** : prefix in front of the keys
*
* **moreAttributes** : more values to be added in the query string. Those values
* won't be prefixed.

@@ -569,2 +771,3 @@ * @return {string} the query string

* }
* @chainable
*/

@@ -592,5 +795,23 @@ AlgoliaSearchHelper.prototype.overrideStateWithoutTriggeringChangeEvent = function(newState) {

/**
* Check if the attribute has any numeric, conjunctive, disjunctive or hierarchical refinements
* Check if an attribute has any numeric, conjunctive, disjunctive or hierarchical filters.
* @param {string} attribute the name of the attribute
* @return {boolean} true if the attribute is filtered by at least one value
* @example
* // hasRefinements works with numeric, conjunctive, disjunctive and hierarchical filters
* helper.hasRefinements('price'); // false
* helper.addNumericRefinement('price', '>', 100);
* helper.hasRefinements('price'); // true
*
* helper.hasRefinements('color'); // false
* helper.addFacetRefinement('color', 'blue');
* helper.hasRefinements('color'); // true
*
* helper.hasRefinements('material'); // false
* helper.addDisjunctiveFacetRefinement('material', 'plastic');
* helper.hasRefinements('material'); // true
*
* helper.hasRefinements('categories'); // false
* helper.toggleRefinement('categories', 'kitchen > knife');
* helper.hasRefinements('categories'); // true
*
*/

@@ -617,6 +838,19 @@ AlgoliaSearchHelper.prototype.hasRefinements = function(attribute) {

/**
* Check the exclude state of a facet
* @param {string} facet the facet
* @param {string} value the associated value
* Check if a value is excluded for a specific facetted attribute. If the value
* is omitted then the function checks if there is any excluding refinements.
*
* @param {string} facet name of the attribute for used for facetting
* @param {string} [value] optionnal value. If passed will test that this value
* is filtering the given facet.
* @return {boolean} true if refined
* @example
* helper.isExcludeRefined('color'); // false
* helper.isExcludeRefined('color', 'blue') // false
* helper.isExcludeRefined('color', 'red') // false
*
* helper.addFacetExclusion('color', 'red');
*
* helper.isExcludeRefined('color'); // true
* helper.isExcludeRefined('color', 'blue') // false
* helper.isExcludeRefined('color', 'red') // true
*/

@@ -635,3 +869,3 @@ AlgoliaSearchHelper.prototype.isExcluded = function(facet, value) {

/**
* Check if the string is a currently filtering tag
* Check if the string is a currently filtering tag.
* @param {string} tag tag to check

@@ -653,4 +887,7 @@ * @return {boolean}

/**
* Get the underlying configured index name
* Get the name of the currently used index.
* @return {string}
* @example
* helper.setIndex('highestPrice_products').getIndex();
* // returns 'highestPrice_products'
*/

@@ -673,2 +910,3 @@ AlgoliaSearchHelper.prototype.getIndex = function() {

* Get the currently selected page
* @function
* @return {number} the current page

@@ -679,4 +917,5 @@ */

/**
* Get all the filtering tags
* @return {string[]}
* Get all the tags currently set to filters the results.
*
* @return {string[]} The list of tags currently set.
*/

@@ -688,5 +927,14 @@ AlgoliaSearchHelper.prototype.getTags = function() {

/**
* Get a parameter of the search by its name
* Get a parameter of the search by its name. It is possible that a parameter is directly
* defined in the index dashboard, but it will be undefined using this method.
*
* The complete list of parameters is
* available on the
* [Algolia website](https://www.algolia.com/doc/rest#query-an-index).
* The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts)
* or benefit from higher-level APIs (all the kind of filters have their own API)
* @param {string} parameterName the parameter name
* @return {any} the parameter value
* @example
* var hitsPerPage = helper.getQueryParameter('hitsPerPage');
*/

@@ -698,6 +946,42 @@ AlgoliaSearchHelper.prototype.getQueryParameter = function(parameterName) {

/**
* Get the list of refinements for a given attribute.
* Get the list of refinements for a given attribute. This method works with
* conjunctive, disjunctive, excluding and numerical filters.
*
* @param {string} facetName attribute name used for facetting
* @return {Refinement[]} All Refinement are objects that contain a value, and
* @return {Array.<FacetRefinement|NumericRefinement>} All Refinement are objects that contain a value, and
* a type. Numeric also contains an operator.
* @example
* helper.addNumericRefinement('price', '>', 100);
* helper.getRefinements('price');
* // [
* // {
* // "value": [
* // 100
* // ],
* // "operator": ">",
* // "type": "numeric"
* // }
* // ]
* @example
* helper.addFacetRefinement('color', 'blue');
* helper.addFacetExclusion('color', 'red');
* helper.getRefinements('color');
* // [
* // {
* // "value": "blue",
* // "type": "conjunctive"
* // },
* // {
* // "value": "red",
* // "type": "exclude"
* // }
* // ]
* @example
* helper.addDisjunctiveFacetRefinement('material', 'plastic');
* // [
* // {
* // "value": "plastic",
* // "type": "disjunctive"
* // }
* // ]
*/

@@ -847,3 +1131,18 @@ AlgoliaSearchHelper.prototype.getRefinements = function(facetName) {

/**
* @typedef AlgoliaSearchHelper.NumericRefinement
* @type {object}
* @property {number[]} value the numbers that are used for filtering this attribute with
* the operator specified.
* @property {string} operator the facetting data: value, number of entries
* @property {string} type will be 'numeric'
*/
/**
* @typedef AlgoliaSearchHelper.FacetRefinement
* @type {object}
* @property {string} value the string use to filter the attribute
* @property {string} type the type of filter: 'conjunctive', 'disjunctive', 'exclude'
*/
module.exports = AlgoliaSearchHelper;
'use strict';
var reduce = require('lodash/collection/reduce');
var reduce = require('lodash/reduce');

@@ -5,0 +5,0 @@ /**

'use strict';
var map = require('lodash/collection/map');
var isArray = require('lodash/lang/isArray');
var isNumber = require('lodash/lang/isNumber');
var isString = require('lodash/lang/isString');
var map = require('lodash/map');
var isArray = require('lodash/isArray');
var isNumber = require('lodash/isNumber');
var isString = require('lodash/isString');
function valToNumber(v) {

@@ -9,0 +8,0 @@ if (isNumber(v)) {

'use strict';
var bind = require('lodash/function/bind');
var bind = require('lodash/bind');

@@ -4,0 +4,0 @@ try {

'use strict';
var forEach = require('lodash/collection/forEach');
var map = require('lodash/collection/map');
var reduce = require('lodash/collection/reduce');
var merge = require('lodash/object/merge');
var isArray = require('lodash/lang/isArray');
var forEach = require('lodash/forEach');
var map = require('lodash/map');
var reduce = require('lodash/reduce');
var merge = require('lodash/merge');
var isArray = require('lodash/isArray');

@@ -22,3 +22,3 @@ var requestBuilder = {

indexName: index,
params: this._getHitsSearchParams(state)
params: requestBuilder._getHitsSearchParams(state)
});

@@ -30,5 +30,5 @@

indexName: index,
params: this._getDisjunctiveFacetSearchParams(state, refinedFacet)
params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet)
});
}, this);
});

@@ -42,9 +42,10 @@ // maybe more to get the root level of hierarchical facets when activated

// we want to get the root values
if (currentRefinement.length > 0 && currentRefinement[0].split(state._getHierarchicalFacetSeparator(hierarchicalFacet)).length > 1) {
var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet);
if (currentRefinement.length > 0 && currentRefinement[0].split(separator).length > 1) {
queries.push({
indexName: index,
params: this._getDisjunctiveFacetSearchParams(state, refinedFacet, true)
params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet, true)
});
}
}, this);
});

@@ -62,8 +63,8 @@ return queries;

.concat(state.disjunctiveFacets)
.concat(this._getHitsHierarchicalFacetsAttributes(state));
.concat(requestBuilder._getHitsHierarchicalFacetsAttributes(state));
var facetFilters = this._getFacetFilters(state);
var numericFilters = this._getNumericFilters(state);
var tagFilters = this._getTagFilters(state);
var facetFilters = requestBuilder._getFacetFilters(state);
var numericFilters = requestBuilder._getNumericFilters(state);
var tagFilters = requestBuilder._getTagFilters(state);
var additionalParams = {

@@ -93,5 +94,5 @@ facets: facets,

_getDisjunctiveFacetSearchParams: function(state, facet, hierarchicalRootLevel) {
var facetFilters = this._getFacetFilters(state, facet, hierarchicalRootLevel);
var numericFilters = this._getNumericFilters(state, facet);
var tagFilters = this._getTagFilters(state);
var facetFilters = requestBuilder._getFacetFilters(state, facet, hierarchicalRootLevel);
var numericFilters = requestBuilder._getNumericFilters(state, facet);
var tagFilters = requestBuilder._getTagFilters(state);
var additionalParams = {

@@ -109,3 +110,7 @@ hitsPerPage: 1,

if (hierarchicalFacet) {
additionalParams.facets = this._getDisjunctiveHierarchicalFacetAttribute(state, hierarchicalFacet, hierarchicalRootLevel);
additionalParams.facets = requestBuilder._getDisjunctiveHierarchicalFacetAttribute(
state,
hierarchicalFacet,
hierarchicalRootLevel
);
} else {

@@ -266,3 +271,4 @@ additionalParams.facets = facet;

var level = hierarchicalRefinement.split(state._getHierarchicalFacetSeparator(hierarchicalFacet)).length;
var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet);
var level = hierarchicalRefinement.split(separator).length;
var newAttributes = hierarchicalFacet.attributes.slice(0, level + 1);

@@ -269,0 +275,0 @@

'use strict';
var forEach = require('lodash/collection/forEach');
var filter = require('lodash/collection/filter');
var map = require('lodash/collection/map');
var isEmpty = require('lodash/lang/isEmpty');
var indexOf = require('lodash/array/indexOf');
var forEach = require('lodash/forEach');
var filter = require('lodash/filter');
var map = require('lodash/map');
var isEmpty = require('lodash/isEmpty');
var indexOf = require('lodash/indexOf');

@@ -9,0 +9,0 @@ function filterState(state, filters) {

'use strict';
var keys = require('lodash/object/keys');
var intersection = require('lodash/array/intersection');
var forOwn = require('lodash/object/forOwn');
var forEach = require('lodash/collection/forEach');
var filter = require('lodash/collection/filter');
var map = require('lodash/collection/map');
var reduce = require('lodash/collection/reduce');
var omit = require('lodash/object/omit');
var indexOf = require('lodash/array/indexOf');
var isNaN = require('lodash/lang/isNaN');
var isArray = require('lodash/lang/isArray');
var isEmpty = require('lodash/lang/isEmpty');
var isEqual = require('lodash/lang/isEqual');
var isUndefined = require('lodash/lang/isUndefined');
var isString = require('lodash/lang/isString');
var isFunction = require('lodash/lang/isFunction');
var find = require('lodash/collection/find');
var pluck = require('lodash/collection/pluck');
var keys = require('lodash/keys');
var intersection = require('lodash/intersection');
var forOwn = require('lodash/forOwn');
var forEach = require('lodash/forEach');
var filter = require('lodash/filter');
var map = require('lodash/map');
var reduce = require('lodash/reduce');
var omit = require('lodash/omit');
var indexOf = require('lodash/indexOf');
var isNaN = require('lodash/isNaN');
var isArray = require('lodash/isArray');
var isEmpty = require('lodash/isEmpty');
var isEqual = require('lodash/isEqual');
var isUndefined = require('lodash/isUndefined');
var isString = require('lodash/isString');
var isFunction = require('lodash/isFunction');
var find = require('lodash/find');
var defaults = require('lodash/object/defaults');
var merge = require('lodash/object/merge');
var defaults = require('lodash/defaults');
var merge = require('lodash/merge');
var warnOnce = require('../functions/warnOnce');

@@ -46,2 +46,4 @@ var valToNumber = require('../functions/valToNumber');

/**
* The facet list is the structure used to store the list of values used to
* filter a single attribute.
* @typedef {string[]} SearchParameters.FacetList

@@ -51,4 +53,5 @@ */

/**
* Structure to store numeric filters with the operator as the key
* @typedef {Object.<string, array.<number|number[]>>} SearchParameters.OperatorList
* Structure to store numeric filters with the operator as the key. The supported operators
* are `=`, `>`, `<`, `>=`, `<=` and `!=`.
* @typedef {Object.<string, Array.<number|number[]>>} SearchParameters.OperatorList
*/

@@ -422,5 +425,6 @@

var self = this;
forOwn(params, function checkForUnknownParameter(paramValue, paramName) {
if (SearchParameters.PARAMETERS.indexOf(paramName) === -1) {
this[paramName] = paramValue;
self[paramName] = paramValue;

@@ -434,3 +438,3 @@ var message =

}
}, this);
});
}

@@ -450,2 +454,5 @@

SearchParameters._parseNumbers = function(partialState) {
// Do not reparse numbers in SearchParameters, they ought to be parsed already
if (partialState instanceof SearchParameters) return partialState;
var numbers = {};

@@ -589,3 +596,3 @@

* @method
* @param {string|SearchParameters.clearCallback} [attribute] optionnal string or function
* @param {undefined|string|SearchParameters.clearCallback} [attribute] optionnal string or function
* - If not given, means to clear all the filters.

@@ -621,2 +628,8 @@ * - If `string`, means to clear all refinements for the `attribute` named filter.

},
/**
* Set the index.
* @method
* @param {string} index the index name
* @return {SearchParameters}
*/
setIndex: function setIndex(index) {

@@ -801,3 +814,4 @@ if (index === this.index) return this;

* @param {string} attribute attribute to set the filter on
* @param {string} operator operator of the filter (possible values: =, >, >=, <, <=, !=)
* @param {string} [operator] operator of the filter (possible values: =, >, >=, <, <=, !=)
* @param {number} [number] the value to be removed
* @return {SearchParameters}

@@ -962,3 +976,3 @@ */

* @param {string} facet name of the attribute used for facetting
* @param {string} value value used to filter
* @param {string} [value] value used to filter
* @return {SearchParameters}

@@ -1206,6 +1220,7 @@ */

* Returns true if the facet contains exclusions or if a specific value is
* excluded
* excluded.
*
* @method
* @param {string} facet name of the attribute for used for facetting
* @param {string} value, optionnal value. If passed will test that this value
* @param {string} [value] optionnal value. If passed will test that this value
* is filtering the given facet.

@@ -1326,3 +1341,3 @@ * @return {boolean} returns true if refined

// so that refinement name index === hierarchical facet index
pluck(this.hierarchicalFacets, 'name'),
map(this.hierarchicalFacets, 'name'),
keys(this.hierarchicalFacetsRefinements)

@@ -1459,2 +1474,3 @@ );

* Helper function to get the hierarchicalFacet separator or the default one (`>`)
* @private
* @param {object} hierarchicalFacet

@@ -1469,2 +1485,3 @@ * @return {string} returns the hierarchicalFacet.separator or `>` as default

* Helper function to get the hierarchicalFacet prefix path or null
* @private
* @param {object} hierarchicalFacet

@@ -1479,2 +1496,3 @@ * @return {string} returns the hierarchicalFacet.rootPath or null as default

* Helper function to check if we show the parent level of the hierarchicalFacet
* @private
* @param {object} hierarchicalFacet

@@ -1506,8 +1524,8 @@ * @return {string} returns the hierarchicalFacet.showParentLevel or true as default

* @callback SearchParameters.clearCallback
* @param {OperatorList|FacetList} value
* @param {string} key
* @param {string} type numeric, disjunctiveFacet, conjunctiveFacet or exclude
* @param {OperatorList|FacetList} value the value of the filter
* @param {string} key the current attribute name
* @param {string} type `numeric`, `disjunctiveFacet`, `conjunctiveFacet`, `hierarchicalFacet` or `exclude`
* depending on the type of facet
* @return {boolean}
* @return {boolean} `true` if the element should be removed. `false` otherwise.
*/
module.exports = SearchParameters;

@@ -15,11 +15,11 @@ 'use strict';

var isUndefined = require('lodash/lang/isUndefined');
var isString = require('lodash/lang/isString');
var isFunction = require('lodash/lang/isFunction');
var isEmpty = require('lodash/lang/isEmpty');
var defaults = require('lodash/object/defaults');
var isUndefined = require('lodash/isUndefined');
var isString = require('lodash/isString');
var isFunction = require('lodash/isFunction');
var isEmpty = require('lodash/isEmpty');
var defaults = require('lodash/defaults');
var reduce = require('lodash/collection/reduce');
var filter = require('lodash/collection/filter');
var omit = require('lodash/object/omit');
var reduce = require('lodash/reduce');
var filter = require('lodash/filter');
var omit = require('lodash/omit');

@@ -121,7 +121,7 @@ var lib = {

* @param {string} attribute name of the attribute
* @param {string} refinementValue value of the filter/refinement
* @param {string} [refinementValue] value of the filter/refinement
* @return {boolean}
*/
isRefined: function isRefined(refinementList, attribute, refinementValue) {
var indexOf = require('lodash/array/indexOf');
var indexOf = require('lodash/indexOf');

@@ -128,0 +128,0 @@ var containsRefinements = !!refinementList[attribute] &&

'use strict';
var invert = require('lodash/object/invert');
var keys = require('lodash/object/keys');
var invert = require('lodash/invert');
var keys = require('lodash/keys');

@@ -6,0 +6,0 @@ var keys2Short = {

@@ -5,9 +5,9 @@ 'use strict';

var last = require('lodash/array/last');
var map = require('lodash/collection/map');
var reduce = require('lodash/collection/reduce');
var sortByOrder = require('lodash/collection/sortByOrder');
var trim = require('lodash/string/trim');
var find = require('lodash/collection/find');
var pick = require('lodash/object/pick');
var last = require('lodash/last');
var map = require('lodash/map');
var reduce = require('lodash/reduce');
var orderBy = require('lodash/orderBy');
var trim = require('lodash/trim');
var find = require('lodash/find');
var pickBy = require('lodash/pickBy');

@@ -77,5 +77,5 @@ var prepareHierarchicalFacetSortBy = require('../functions/formatSort');

parent.data = sortByOrder(
parent.data = orderBy(
map(
pick(hierarchicalFacetResult.data, onlyMatchingValuesFn),
pickBy(hierarchicalFacetResult.data, onlyMatchingValuesFn),
formatHierarchicalFacetValue(hierarchicalSeparator, currentRefinement)

@@ -82,0 +82,0 @@ ),

'use strict';
var forEach = require('lodash/collection/forEach');
var compact = require('lodash/array/compact');
var indexOf = require('lodash/array/indexOf');
var findIndex = require('lodash/array/findIndex');
var forEach = require('lodash/forEach');
var compact = require('lodash/compact');
var indexOf = require('lodash/indexOf');
var findIndex = require('lodash/findIndex');
var sum = require('lodash/collection/sum');
var find = require('lodash/collection/find');
var includes = require('lodash/collection/includes');
var map = require('lodash/collection/map');
var sortByOrder = require('lodash/collection/sortByOrder');
var sumBy = require('lodash/sumBy');
var find = require('lodash/find');
var includes = require('lodash/includes');
var map = require('lodash/map');
var orderBy = require('lodash/orderBy');
var defaults = require('lodash/object/defaults');
var merge = require('lodash/object/merge');
var defaults = require('lodash/defaults');
var merge = require('lodash/merge');
var isArray = require('lodash/lang/isArray');
var isFunction = require('lodash/lang/isFunction');
var isArray = require('lodash/isArray');
var isFunction = require('lodash/isFunction');
var partial = require('lodash/function/partial');
var partialRight = require('lodash/function/partialRight');
var partial = require('lodash/partial');
var partialRight = require('lodash/partialRight');

@@ -31,3 +31,3 @@ var formatSort = require('../functions/formatSort');

* @property {string} name name of the attribute in the record
* @property {object.<string, number>} data the facetting data: value, number of entries
* @property {object} data the facetting data: value, number of entries
* @property {object} stats undefined unless facet_stats is retrieved from algolia

@@ -40,7 +40,7 @@ */

* @property {string} name name of the current value given the hierarchical level, trimmed.
* If root node, you get the facet name
* @property {number} count number (integer) of objets matching this hierarchical value
* If root node, you get the facet name
* @property {number} count number of objets matching this hierarchical value
* @property {string} path the current hierarchical value full path
* @property {boolean} isRefined true if the current value was refined, false otherwise
* @property {SearchResults.HierarchicalFacet[]} data sub values for the current level
* @property {boolean} isRefined `true` if the current value was refined, `false` otherwise
* @property {HierarchicalFacet[]} data sub values for the current level
*/

@@ -225,4 +225,7 @@

/**
* all the records that match the search parameters. It also contains _highlightResult,
* which describe which and how the attributes are matched.
* all the records that match the search parameters. Each record is
* augmented with a new attribute `_highlightResult`
* which is an object keyed by attribute and with the following properties:
* - `value` : the value of the facet highlighted (html)
* - `matchLevel`: full, partial or none depending on how the query terms match
* @member {object[]}

@@ -260,3 +263,3 @@ */

*/
this.processingTimeMS = sum(algoliaResponse.results, 'processingTimeMS');
this.processingTimeMS = sumBy(algoliaResponse.results, 'processingTimeMS');
/**

@@ -315,2 +318,3 @@ * The position if the position was guessed by IP.

var self = this;
// Since we send request only for disjunctive facets that have been refined,

@@ -325,6 +329,7 @@ // we get the facets informations from the first, general, response.

if (hierarchicalFacet) {
// Place the hierarchicalFacet data at the correct index depending on the attributes order that was defined at the
// helper initialization
// Place the hierarchicalFacet data at the correct index depending on
// the attributes order that was defined at the helper initialization
var facetIndex = hierarchicalFacet.attributes.indexOf(facetKey);
this.hierarchicalFacets[findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name})][facetIndex] = {
var idxAttributeName = findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name});
self.hierarchicalFacets[idxAttributeName][facetIndex] = {
attribute: facetKey,

@@ -341,3 +346,3 @@ data: facetValueObject,

position = disjunctiveFacetsIndices[facetKey];
this.disjunctiveFacets[position] = {
self.disjunctiveFacets[position] = {
name: facetKey,

@@ -347,7 +352,7 @@ data: facetValueObject,

};
assignFacetStats(this.disjunctiveFacets[position], mainSubResponse.facets_stats, facetKey);
assignFacetStats(self.disjunctiveFacets[position], mainSubResponse.facets_stats, facetKey);
}
if (isFacetConjunctive) {
position = facetsIndices[facetKey];
this.facets[position] = {
self.facets[position] = {
name: facetKey,

@@ -357,8 +362,8 @@ data: facetValueObject,

};
assignFacetStats(this.facets[position], mainSubResponse.facets_stats, facetKey);
assignFacetStats(self.facets[position], mainSubResponse.facets_stats, facetKey);
}
}
}, this);
});
// Make sure we do not keep wholes within the hierarchical facets
// Make sure we do not keep holes within the hierarchical facets
this.hierarchicalFacets = compact(this.hierarchicalFacets);

@@ -377,3 +382,3 @@

position = findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name});
var attributeIndex = findIndex(this.hierarchicalFacets[position], {attribute: dfacet});
var attributeIndex = findIndex(self.hierarchicalFacets[position], {attribute: dfacet});

@@ -385,5 +390,5 @@ // previous refinements and no results so not able to find it

this.hierarchicalFacets[position][attributeIndex].data = merge(
self.hierarchicalFacets[position][attributeIndex].data = merge(
{},
this.hierarchicalFacets[position][attributeIndex].data,
self.hierarchicalFacets[position][attributeIndex].data,
facetResults

@@ -396,3 +401,3 @@ );

this.disjunctiveFacets[position] = {
self.disjunctiveFacets[position] = {
name: dfacet,

@@ -402,3 +407,3 @@ data: defaults({}, facetResults, dataFromMainRequest),

};
assignFacetStats(this.disjunctiveFacets[position], result.facets_stats, dfacet);
assignFacetStats(self.disjunctiveFacets[position], result.facets_stats, dfacet);

@@ -408,12 +413,12 @@ if (state.disjunctiveFacetsRefinements[dfacet]) {

// add the disjunctive refinements if it is no more retrieved
if (!this.disjunctiveFacets[position].data[refinementValue] &&
if (!self.disjunctiveFacets[position].data[refinementValue] &&
indexOf(state.disjunctiveFacetsRefinements[dfacet], refinementValue) > -1) {
this.disjunctiveFacets[position].data[refinementValue] = 0;
self.disjunctiveFacets[position].data[refinementValue] = 0;
}
}, this);
});
}
}
}, this);
});
nextDisjunctiveResult++;
}, this);
});

@@ -436,3 +441,3 @@ // if we have some root level values for hierarchical facets, merge them

var position = findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name});
var attributeIndex = findIndex(this.hierarchicalFacets[position], {attribute: dfacet});
var attributeIndex = findIndex(self.hierarchicalFacets[position], {attribute: dfacet});

@@ -456,14 +461,14 @@ // previous refinements and no results so not able to find it

var root = currentRefinement[0].split(separator)[0];
defaultData[root] = this.hierarchicalFacets[position][attributeIndex].data[root];
defaultData[root] = self.hierarchicalFacets[position][attributeIndex].data[root];
}
this.hierarchicalFacets[position][attributeIndex].data = defaults(
self.hierarchicalFacets[position][attributeIndex].data = defaults(
defaultData,
facetResults,
this.hierarchicalFacets[position][attributeIndex].data
self.hierarchicalFacets[position][attributeIndex].data
);
}, this);
});
nextDisjunctiveResult++;
}, this);
});

@@ -474,3 +479,3 @@ // add the excludes

this.facets[position] = {
self.facets[position] = {
name: facetName,

@@ -481,7 +486,7 @@ data: mainSubResponse.facets[facetName],

forEach(excludes, function(facetValue) {
this.facets[position] = this.facets[position] || {name: facetName};
this.facets[position].data = this.facets[position].data || {};
this.facets[position].data[facetValue] = 0;
}, this);
}, this);
self.facets[position] = self.facets[position] || {name: facetName};
self.facets[position].data = self.facets[position].data || {};
self.facets[position].data[facetValue] = 0;
});
});

@@ -548,2 +553,3 @@ this.hierarchicalFacets = map(this.hierarchicalFacets, generateHierarchicalTree(state));

* Sort nodes of a hierarchical facet results
* @private
* @param {HierarchicalFacet} node node to upon which we want to apply the sort

@@ -573,4 +579,4 @@ */

* @param {string} attribute attribute name
* @param {object} options configuration options
* - sortBy : function or array of string
* @param {object} opts configuration options. One attribute can be set
* `sortBy` which can be either a comparison function or an array of string
* @return {FacetValue[]|HierarchicalFacet} depending on the type of facet of

@@ -599,6 +605,6 @@ * the attribute requested (hierarchical, disjunctive or conjunctive)

if (isArray(facetValues)) {
return sortByOrder(facetValues, order[0], order[1]);
return orderBy(facetValues, order[0], order[1]);
}
// If facetValues is not an array, it's an object thus a hierarchical facet object
return recSort(partialRight(sortByOrder, order[0], order[1]), facetValues);
return recSort(partialRight(orderBy, order[0], order[1]), facetValues);
} else if (isFunction(options.sortBy)) {

@@ -605,0 +611,0 @@ if (isArray(facetValues)) {

@@ -14,12 +14,13 @@ 'use strict';

var bind = require('lodash/function/bind');
var forEach = require('lodash/collection/forEach');
var pick = require('lodash/object/pick');
var map = require('lodash/collection/map');
var mapKeys = require('lodash/object/mapKeys');
var mapValues = require('lodash/object/mapValues');
var isString = require('lodash/lang/isString');
var isPlainObject = require('lodash/lang/isPlainObject');
var isArray = require('lodash/lang/isArray');
var invert = require('lodash/object/invert');
var bind = require('lodash/bind');
var forEach = require('lodash/forEach');
var pick = require('lodash/pick');
var map = require('lodash/map');
var mapKeys = require('lodash/mapKeys');
var mapValues = require('lodash/mapValues');
var isString = require('lodash/isString');
var isPlainObject = require('lodash/isPlainObject');
var isArray = require('lodash/isArray');
var invert = require('lodash/invert');
var encode = require('qs/lib/utils').encode;

@@ -26,0 +27,0 @@

'use strict';
module.exports = '2.11.1';
module.exports = '2.12.0';

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 too big to display

Sorry, the diff of this file is too big to display

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