UNPKG
quixote
Version:
latest (1.0.1)
1.0.1
1.0.0
0.15.0
0.14.2
0.14.1
0.14.0
0.13.0
0.12.5
0.12.4
0.12.3
0.12.2
0.12.1
0.12.0
0.11.0
0.10.0
0.9.0
0.8.0
0.7.2
0.7.1
0.7.0
0.6.1
0.6.0
0.5.1
0.5.0
0.4.1
0.4.0
0.3.1
0.3.0
0.2.0
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1
0.0.0
CSS unit and integration testing
github.com/jamesshore/quixote
jamesshore/quixote
quixote
/
vendor
/
camelcase-1.0.1-modified.js
14 lines
(12 loc)
•
229 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'use strict'
;
module
.
exports
=
function
(
str
) {
if
(str.
length
===
1
) {
return
str; }
return
str .
replace
(
/^[_.\- ]+/
,
''
) .
toLowerCase
() .
replace
(
/[_.\- ]+(\w|$)/g
,
function
(
m, p1
) {
return
p1.
toUpperCase
(); }); };