Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/antfu/utils
/ capitalize
Function
capitalize
src/string.ts:106–108 ·
view source on GitHub ↗
(str: string)
Source
from the content-addressed store, hash-verified
104
* ```
105
*/
106
export
function
capitalize(str: string): string {
107
return
str[0].toUpperCase() + str.slice(1).toLowerCase()
108
}
109
110
const
_reFullWs = /^\s*$/
111
Callers
1
string.test.ts
File · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected