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

    Function updateWordlist

    • Updates or adds a wordlist to a specific grid in a gridset

      Parameters

      • gridsetBuffer: Buffer

        The gridset file as a Buffer

      • gridName: string

        The name of the grid to update (e.g., "Greetings")

      • wordlist: WordList

        The wordlist to add/update

      • password: string | undefined = ...

      Returns Buffer

      Updated gridset as a Buffer

      const gridsetBuffer = fs.readFileSync('my-gridset.gridset');
      const newWordlist = createWordlist(['hello', 'hi', 'hey']);
      const updatedGridset = updateWordlist(gridsetBuffer, 'Greetings', newWordlist);
      fs.writeFileSync('updated-gridset.gridset', updatedGridset);