How to use the algoliasearch/index.default 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 / angular-instantsearch / src / create-ssr-algolia-client.ts View on Github external
import * as algoliasearchProxy from 'algoliasearch/index';
import * as encodeProxy from 'querystring-es3/encode';

import { VERSION } from './version';

// AOT + Rollup workaround
// https://github.com/rollup/rollup/issues/1267#issuecomment-296395734

const algoliasearch = algoliasearchProxy.default || algoliasearchProxy;
const encode = encodeProxy.default || encodeProxy;

export function createSSRAlgoliaClient({
  httpClient,
  HttpHeaders,
  transferState,
  makeStateKey,
}) {
  console.warn(
    '`createSSRAlgoliaClient` is deprecated in favor of `createSSRSearchClient` to be plugged to `searchClient`.'
  );

  return (_, appId, apiKey) =>
    createSSRSearchClient({
      appId,
      apiKey,

algoliasearch

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

MIT
Latest version published 3 days ago

Package Health Score

83 / 100
Full package analysis