UNPKG
@samlevy/string-helpers
Version:
latest (1.2.0)
1.2.0
1.1.0
1.0.1
1.0.0
Basic string helper functions
github.com/samlev/string-helpers
samlev/string-helpers
@samlevy/string-helpers
/
src
/
studly.ts
13 lines
(11 loc)
•
204 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
import
normalize
from
"./normalize"
;
/** * Convert a string to StudlyCase * *
@param
str
*/
export
default
(
str
:
string
):
string
=>
str .
split
(
/[^a-z0-9]/gi
) .
map
(normalize) .
join
(
""
);