zss-engine 0.2.33 → 0.2.35

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.
@@ -14,7 +14,9 @@ const applyCssValue = (value, cssProp) => {
14
14
  return value;
15
15
  };
16
16
  exports.applyCssValue = applyCssValue;
17
- const camelToKebabCase = (property) => {
18
- return property.replace(/([A-Z])/g, '-$1').toLowerCase();
19
- };
17
+ const camelToKebabCase = (property) => 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();
20
22
  exports.camelToKebabCase = camelToKebabCase;
@@ -10,6 +10,8 @@ export const applyCssValue = (value, cssProp) => {
10
10
  }
11
11
  return value;
12
12
  };
13
- export const camelToKebabCase = (property) => {
14
- return property.replace(/([A-Z])/g, '-$1').toLowerCase();
15
- };
13
+ export const camelToKebabCase = (property) => property
14
+ .replace(/([A-Z]+)([0-9]+)/g, '$1$2')
15
+ .replace(/([a-z0-9])([A-Z])/g, '$1-$2')
16
+ .replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
17
+ .toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zss-engine",
3
- "version": "0.2.33",
3
+ "version": "0.2.35",
4
4
  "description": "Zero-runtime StyleSheet Engine",
5
5
  "keywords": [
6
6
  "zero-runtime",