We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63acce6 commit 86fd44dCopy full SHA for 86fd44d
src/idom/utils.py
@@ -201,15 +201,7 @@ def _generate_vdom_children(
201
)
202
203
204
-def _hypen_to_camel_case(css_key: str) -> str:
+def _hypen_to_camel_case(string: str) -> str:
205
"""Convert a hypenated string to camelCase."""
206
- first_word, *subsequent_words = css_key.split("-")
207
-
208
- return "".join(
209
- [
210
- # Lowercase the first word
211
- first_word.lower(),
212
- # Use map() to titlecase all subsequent words
213
- *map(str.title, subsequent_words),
214
- ]
215
- )
+ first, remainder = string.split("-", 1)
+ return first.lower() + remainder.title().replace("-", "")
0 commit comments