@alextheman/utility - v4.3.5
    Preparing search index...

    Function truncate

    • Truncates a string and appends ... to the end of it

      Parameters

      • stringToTruncate: string

        The string to truncate.

      • maxLength: number = 5

        The length at which to start truncating. Note that this does not include the ... part that would be appended.

      Returns string

      A new string that has been truncated based on the length provided.