zss-engine 0.2.35 → 0.2.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/utils/helper.js +10 -5
- package/dist/esm/utils/helper.js +10 -5
- package/package.json +1 -1
package/dist/cjs/utils/helper.js
CHANGED
|
@@ -14,9 +14,14 @@ const applyCssValue = (value, cssProp) => {
|
|
|
14
14
|
return value;
|
|
15
15
|
};
|
|
16
16
|
exports.applyCssValue = applyCssValue;
|
|
17
|
-
const camelToKebabCase = (property) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const camelToKebabCase = (property) => {
|
|
18
|
+
if (/^(ms|Moz|Webkit)/.test(property)) {
|
|
19
|
+
property = '-' + property;
|
|
20
|
+
}
|
|
21
|
+
return (property
|
|
22
|
+
.replace(/([A-Z]+)([0-9]+)/g, '$1$2')
|
|
23
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
24
|
+
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
|
|
25
|
+
.toLowerCase());
|
|
26
|
+
};
|
|
22
27
|
exports.camelToKebabCase = camelToKebabCase;
|
package/dist/esm/utils/helper.js
CHANGED
|
@@ -10,8 +10,13 @@ export const applyCssValue = (value, cssProp) => {
|
|
|
10
10
|
}
|
|
11
11
|
return value;
|
|
12
12
|
};
|
|
13
|
-
export const camelToKebabCase = (property) =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
export const camelToKebabCase = (property) => {
|
|
14
|
+
if (/^(ms|Moz|Webkit)/.test(property)) {
|
|
15
|
+
property = '-' + property;
|
|
16
|
+
}
|
|
17
|
+
return (property
|
|
18
|
+
.replace(/([A-Z]+)([0-9]+)/g, '$1$2')
|
|
19
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
20
|
+
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
|
|
21
|
+
.toLowerCase());
|
|
22
|
+
};
|