ts-playground
    Preparing search index...

    Function extractUniqueWords

    • Get unique words from the document

      Parameters

      • document: Document

        The document to extract unique words from

      Returns Set<string>

      A set of unique words

      const document = ['a', 'b', 'c', 'c', 'a']
      const result = extractUniqueWords([document])
      result // => new Set(['a', 'b', 'c'])