[feat] Update extension builder for 1.4.1 (#3725)

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Vlad Stan
2026-01-20 14:47:54 +02:00
committed by GitHub
co-authored by dni ⚡
parent 28e9d32b44
commit a947686d79
11 changed files with 190 additions and 50 deletions
+8
View File
@@ -391,6 +391,14 @@ def camel_to_snake(name: str) -> str:
return name.lower()
def snake_to_camel(name: str, capitalize_first: bool | None = False) -> str:
components = name.split("_")
camel = components[0] + "".join(x.capitalize() for x in components[1:])
if capitalize_first:
camel = camel[0].upper() + camel[1:]
return camel
def is_camel_case(v: str) -> bool:
return re.match(r"^[A-Z][a-z0-9]+([A-Z][a-z0-9]+)*$", v) is not None