Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/zenstackhq/zenstack
/ toSnakeCase
Function
toSnakeCase
packages/cli/src/actions/pull/casing.ts:37–43 ·
view source on GitHub ↗
(str: string)
Source
from the content-addressed store, hash-verified
35
}
36
37
export
function
toSnakeCase(str: string): string {
38
if
(isAllUpperCase(str))
return
str;
39
return
str
40
.replace(/[- ]+/g,
'_'
)
41
.replace(/([a-z0-9])([A-Z])/g,
'$1_$2'
)
42
.toLowerCase();
43
}
Callers
2
casing.test.ts
File · 0.90
resolveNameCasing
Function · 0.85
Calls
1
isAllUpperCase
Function · 0.85
Tested by
no test coverage detected