jj
    Preparing search index...

    Function keb2cam

    • Converts a kebab-case string to camelCase.

      Parameters

      • str: string

        The string to convert.

      Returns string

      The camelCase string.

      This function is primarily useful for converting attributes to JavaScript property names. Leading and trailing hyphens are removed before conversion.

      keb2cam('background-color') // 'backgroundColor'
      keb2cam('-webkit-transform') // 'webkitTransform'

      If str is not a string.