UNPKG
@vue-interface/utils
Version:
latest (0.9.34)
0.9.34
0.9.33
0.9.32
0.9.31
0.9.30
0.9.29
0.9.28
0.9.27
0.9.26
0.9.25
0.9.24
0.9.23
0.9.22
0.9.21
0.9.20
0.9.19
0.9.18
0.9.17
0.9.16
0.9.15
0.9.14
0.9.13
0.9.12
0.9.11
0.9.10
0.9.9
0.9.8
0.9.7
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
A utility package for Vue Interface.
github.com/vue-interface/utils/docs
vue-interface/utils
@vue-interface/utils
/
src
/
kebabCase.js
7 lines
•
224 B
JavaScript
View Raw
1
2
3
4
5
6
7
export
default
function
kebabCase
(
str
) {
return
str && str.
replace
? str.
replace
(
/([a-z])([A-Z])/g
,
'$1-$2'
) .
replace
(
/\s+/g
,
'-'
) .
replace
(
/_/g
,
'-'
) .
toLowerCase
() :
null
; };