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