create-instantsearch-app
Version:
⚡️ Build InstantSearch apps at the speed of thought
19 lines (17 loc) • 353 B
JavaScript
const getInformationFromIndex = require('./getInformationFromIndex');
module.exports = async function getFacetsFromIndex({
appId,
apiKey,
indexName,
} = {}) {
try {
const { facets } = await getInformationFromIndex({
appId,
apiKey,
indexName,
});
return Object.keys(facets);
} catch (err) {
return [];
}
};