Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function textToWords(text: string): string[] {
const setOfWords = new Set(
Text.extractWordsFromCode(text)
.map(t => t.text)
.map(t => t.toLowerCase())
);
return [...setOfWords];
}