@entur/tokens 3.22.3 → 3.22.4
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/tokens.cjs.js +1 -1
- package/dist/tokens.cjs.js.map +1 -1
- package/dist/tokens.esm.js +1 -1
- package/dist/tokens.esm.js.map +1 -1
- package/package.json +2 -3
package/dist/tokens.cjs.js
CHANGED
|
@@ -669,7 +669,7 @@ function toKebabCase(name) {
|
|
|
669
669
|
return name.replace(/\//g, "-").replace(/\s/g, "").toLowerCase();
|
|
670
670
|
}
|
|
671
671
|
function toFlattenedJSObjectKey(name) {
|
|
672
|
-
const nameWithoutSpacesAndDashes = name.toLowerCase().replace(/\s(\w)/g, (_, letter) => letter.toUpperCase()).replace(
|
|
672
|
+
const nameWithoutSpacesAndDashes = name.toLowerCase().replace(/\s(\w)/g, (_, letter) => letter.toUpperCase()).replace(/-(\w)/g, (_, letter) => letter.toUpperCase());
|
|
673
673
|
const nameArray = nameWithoutSpacesAndDashes.split("/");
|
|
674
674
|
const nameArrayWithStringNumbers = nameArray.map((namePart) => {
|
|
675
675
|
if (!isNaN(Number(namePart.charAt(0)))) {
|