@gtk-js/icon-helpers 0.0.1 → 0.1.0
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/build-helpers.ts +2 -2
package/CHANGELOG.md
ADDED
package/package.json
CHANGED
package/src/build-helpers.ts
CHANGED
|
@@ -22,8 +22,8 @@ export function toPascalCase(str: string): string {
|
|
|
22
22
|
export function toKebabCase(str: string): string {
|
|
23
23
|
return str
|
|
24
24
|
.replace(/-symbolic$/, "")
|
|
25
|
-
.replace(/[^a-zA-Z0-9-]/g, "-") // replace non-alphanumeric chars with hyphens
|
|
26
|
-
.replace(
|
|
25
|
+
.replace(/[^a-zA-Z0-9-_]/g, "-") // replace non-alphanumeric chars with hyphens
|
|
26
|
+
.replace(/[-_]+/g, "-") // collapse multiple hyphens/underscores
|
|
27
27
|
.replace(/^-|-$/g, ""); // trim leading/trailing hyphens
|
|
28
28
|
}
|
|
29
29
|
|