Skip to content

Commit a3b0a45

Browse files
vankopai
authored andcommitted
1 parent 45933a2 commit a3b0a45

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

test/camel-case.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const data = {
1717
webkitApp: "-webkit-app",
1818
onChange: "on-change",
1919
OnChange: "-on-change",
20+
overflowWrap: "overflow-wrap",
21+
overflowX: "overflow-x",
2022
zIndex: "z-index",
2123
"::selection": "::selection",
2224
"::mozSelection": "::-moz-selection",

un-camel-case.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
function unCamelCase (str) {
33
return str.replace(/[\w-]+/g, (s) => (
4-
/^[A-Z]?[a-z]*(?:[A-Z][a-z]+)+$/.test(s)
4+
/^[A-Z]?[a-z]*(?:[A-Z][a-z]*)+$/.test(s)
55
? s.replace(
66
/[A-Z]/g,
77
s => "-" + s.toLowerCase()

0 commit comments

Comments
 (0)