@ironarachne/words
    Preparing search index...

    Function truncateWords

    • This function truncates a string to a specific number of words.

      Parameters

      • text: string

        The text to truncate.

      • maxWords: number

        The maximum number of words.

      • Optionalsuffix: string = "..."

        The suffix to append if truncated.

      Returns string

      The truncated text.