@eroyeroy/utils - v0.1.0
    Preparing search index...

    Function hasMaxLength

    • Returns true if the string length does not exceed max characters.

      Parameters

      • value: string

        The string to check.

      • max: number

        Maximum length (inclusive).

      Returns boolean

      hasMaxLength("hello", 10) // => true
      hasMaxLength("hello", 3) // => false