{{- /*
  Convert a snake_case string to camelCase.
  Strategy: split by "_", capitalize first letter of each part (except first), then concatenate

  @param {String} . - The snake_case string
  @return {String} The camelCase string

  @example
  // "max_shown_lines" -> "maxShownLines"
  {{- partial "function/camel-case.html" "max_shown_lines" -}}
*/ -}}
{{- $parts := split . "_" -}}
{{- $result := index $parts 0 -}}
{{- range $i, $part := $parts -}}
  {{- if gt $i 0 -}}
    {{- $result = printf "%s%s%s" $result (upper (substr $part 0 1)) (substr $part 1) -}}
  {{- end -}}
{{- end -}}
{{- return $result -}}
