How to use the algoliasearch/src/browser/builds/algoliasearchLite.js function in algoliasearch

To help you get started, we’ve selected a few algoliasearch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github algolia / react-instantsearch / src / lib / InstantSearch.js View on Github external
searchParameters = {},
    urlSync = null,
    searchFunction
  }) {
    super();
    if (appId === null || apiKey === null || indexName === null) {
      const usage = `
Usage: instantsearch({
  appId: 'my_application_id',
  apiKey: 'my_search_api_key',
  indexName: 'my_index_name'
});`;
      throw new Error(usage);
    }

    const client = algoliasearch(appId, apiKey);
    client.addAlgoliaAgent(`instantsearch.js ${version}`);

    this.client = client;
    this.helper = null;
    this.indexName = indexName;
    this.searchParameters = {...searchParameters, index: indexName};
    this.widgets = [];
    this.templatesConfig = {
      helpers: createHelpers({numberLocale}),
      compileOptions: {}
    };

    if (searchFunction) {
      this._searchFunction = searchFunction;
    }

algoliasearch

A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.

MIT
Latest version published 20 days ago

Package Health Score

88 / 100
Full package analysis