@vgabriel45/demo-sdk 1.3.1 → 2.0.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/index.js +14 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -54,3 +54,17 @@ export function formatInitials(name = "") {
|
|
|
54
54
|
.map((word) => word.charAt(0))
|
|
55
55
|
.join("");
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
/** Format display text into a URL-friendly slug. */
|
|
59
|
+
export function formatSlug(text = "") {
|
|
60
|
+
return String(text ?? "")
|
|
61
|
+
.trim()
|
|
62
|
+
.toLowerCase()
|
|
63
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
64
|
+
.replace(/^-+|-+$/g, "");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Return a stable marker used for release-flow demos. */
|
|
68
|
+
export function getDemoSdkMarker() {
|
|
69
|
+
return "demo-sdk-change";
|
|
70
|
+
}
|