Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Effect-TS/effect
/ pascalToSnake
Function
pascalToSnake
packages/effect/src/String.ts:1118–1119 ·
view source on GitHub ↗
(self: string)
Source
from the content-addressed store, hash-verified
1116
* @since 2.0.0
1117
*/
1118
export
const
pascalToSnake = (self: string): string =>
1119
(self.slice(0, 1) + self.slice(1).replace(/([A-Z])/g,
"_$1"
)).toLowerCase()
1120
1121
/**
1122
* Converts a kebab-case string to snake_case.
Callers
nothing calls this directly
Calls
1
replace
Method · 0.45
Tested by
no test coverage detected