How to use lunr-languages - 2 common examples

To help you get started, we’ve selected a few lunr-languages 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 veteransaffairscanada / vac-benefits-directory / store.js View on Github external
import lunr from "lunr";
import stemmerSupport from "lunr-languages/lunr.stemmer.support.js";
import fr from "lunr-languages/lunr.fr.js";
import { createStore } from "redux";
import airtableConstants from "./utils/hardcoded_strings";

stemmerSupport(lunr);
fr(lunr);

const initialState = {
  enIdx: {},
  frIdx: {},
  searchString: "",
  selectedNeeds: {},
  cookiesDisabled: false,
  language: "",
  betaFeedback: ""
};
airtableConstants.tableNames.forEach(tableName => {
  initialState[tableName] = [];
});

// REDUCERS
export const reducer = (state = initialState, action) => {
github veteransaffairscanada / vac-benefits-directory / store.js View on Github external
import lunr from "lunr";
import stemmerSupport from "lunr-languages/lunr.stemmer.support.js";
import fr from "lunr-languages/lunr.fr.js";
import { createStore } from "redux";
import airtableConstants from "./utils/hardcoded_strings";

stemmerSupport(lunr);
fr(lunr);

const initialState = {
  enIdx: {},
  frIdx: {},
  searchString: "",
  selectedNeeds: {},
  cookiesDisabled: false,
  language: "",
  betaFeedback: ""
};
airtableConstants.tableNames.forEach(tableName => {
  initialState[tableName] = [];
});

// REDUCERS

lunr-languages

A a collection of languages stemmers and stopwords for Lunr Javascript library

MPL-1.1
Latest version published 1 year ago

Package Health Score

62 / 100
Full package analysis