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