MCPcopy
hub / github.com/python-visualization/folium / camelize

Function camelize

folium/utilities.py:343–353  ·  view source on GitHub ↗

Convert a python_style_variable_name to lowerCamelCase. Examples -------- >>> camelize("variable_name") 'variableName' >>> camelize("variableName") 'variableName'

(key: str)

Source from the content-addressed store, hash-verified

341
342
343def camelize(key: str) -> str:
344 """Convert a python_style_variable_name to lowerCamelCase.
345
346 Examples
347 --------
348 >>> camelize("variable_name")
349 'variableName'
350 >>> camelize("variableName")
351 'variableName'
352 """
353 return "".join(x.capitalize() if i > 0 else x for i, x in enumerate(key.split("_")))
354
355
356def compare_rendered(obj1: str, obj2: str) -> bool:

Callers 5

__init__Method · 0.90
path_optionsFunction · 0.90
tojavascriptFunction · 0.90
test_camelizeFunction · 0.90
parse_optionsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_camelizeFunction · 0.72