svelte-algolia
Advanced tools
Comparing version 0.1.4 to 0.1.5
{ | ||
"name": "svelte-algolia", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Algolia plugin for Svelte", | ||
@@ -39,2 +39,2 @@ "main": "src/index.js", | ||
} | ||
} | ||
} |
@@ -60,2 +60,6 @@ <p align="center"> | ||
// are checked for deep-equality to discover changes | ||
settings: {}, // an object of Algolia index settings that applies to all indices | ||
// see https://algolia.com/doc/api-reference/settings-api-parameters | ||
// can be overridden by a settings object passed as part of the indices array: | ||
// indices = [{ name: `pokedex`, ..., settings: { foo: `bar` }}], | ||
} | ||
@@ -62,0 +66,0 @@ ``` |
@@ -8,2 +8,3 @@ /* eslint-disable no-console */ | ||
matchFields: [], | ||
settings: {}, | ||
} | ||
@@ -39,6 +40,6 @@ | ||
const updateIndex = (client, config) => async (updateObj) => { | ||
const updateIndex = (client, config) => async (indexObj) => { | ||
const { partialUpdates = false, matchFields: mainMatchFields } = config | ||
const { name, getData, matchFields = mainMatchFields } = updateObj | ||
let { settings = config.settings } = updateObj | ||
const { name, getData, matchFields = mainMatchFields } = indexObj | ||
let { settings = config.settings } = indexObj | ||
@@ -53,3 +54,3 @@ const index = client.initIndex(name) | ||
else if (!(await index.exists())) { | ||
const { taskID } = await index.setSettings(settings || {}) | ||
const { taskID } = await index.setSettings(settings) | ||
await index.waitTask(taskID) | ||
@@ -56,0 +57,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11277
151
100