Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static getStemmer(locale) {
if (!locale) {
return new BaseStemmer();
}
const name = `Stemmer${locale.slice(0, 1).toUpperCase()}${locale.slice(1)}`;
const Stemmer = LangAll[name];
return Stemmer ? new Stemmer() : new BaseStemmer();
}