MCPcopy Create free account
hub / github.com/hugapi/hug / underscore

Function underscore

hug/format.py:50–52  ·  view source on GitHub ↗

Converts text that may be camelcased into an underscored format

(text)

Source from the content-addressed store, hash-verified

48
49
50def underscore(text):
51 """Converts text that may be camelcased into an underscored format"""
52 return UNDERSCORE[1].sub(r"\1_\2", UNDERSCORE[0].sub(r"\1_\2", text)).lower()
53
54
55def camelcase(text):

Callers 2

decoratorFunction · 0.90
_underscore_dictFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected