Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{ w: lc, p: true },
{ w: lc_na, p: true },
];
};
const words = genSequence(wordList)
.filter(word => typeof word === 'string')
.map(word => word.trim())
.filter(w => !!w)
.concatMap(mapCase)
.reduce((s, w) => {
if (!s.has(w.w)) {
s.add(w.p ? PREFIX_NO_CASE + w.w : w.w);
}
return s;
}, new Set());
const trie = Trie.create(words);
return new SpellingDictionaryFromTrie(trie, name, options, source, words.size);
}