@willwade/aac-processors
    Preparing search index...

    Function extractWordlists

    • Extracts all wordlists from a gridset buffer

      Parameters

      • gridsetBuffer: Uint8Array

        The gridset file as a Buffer

      • password: string | undefined = ...
      • fileAdapter: FileAdapter = defaultFileAdapter
      • OptionalzipAdapter: (input: ProcessorInput) => Promise<ZipAdapter>

      Returns Promise<Map<string, WordList>>

      Map of grid names to their wordlists (if they have any)

      const wordlists = await extractWordlists(gridsetBuffer);
      wordlists.forEach((wordlist, gridName) => {
      console.log(`Grid "${gridName}" has ${wordlist.items.length} items`);
      });