def to_camel_case(text: str, treat_hyphens_as_underscores: bool = True) -> str:
    """Convert a string to camel case.

    The first word in the text is converted to lowercase and
    the rest of the words are converted to title case, removing underscores.

    Args:
        text: The string to convert.
        treat_hyphens_as_underscores: Whether to allow hyphens in the string.

    Returns:
        The camel case string.
    """
    if treat_hyphens_as_underscores:
        text = text.replace("-", "_")
    words = text.split("_")
    # Capitalize the first letter of each word except the first one
    if len(words) == 1:
        return words[0]
    return words[0] + "".join([w.capitalize() for w in words[1:]])
Convert a string to camel case.

    The first word in the text is converted to lowercase and
    the rest of the words are converted to title case, removing underscores.

    Args:
        text: The string to convert.
        treat_hyphens_as_underscores: Whether to allow hyphens in the string.

    Returns:
        The camel case string.
    
reflex/utils/format.py