@pnkx-lib/ui 1.9.427 → 1.9.428
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/es/index.js
CHANGED
|
@@ -106,4 +106,9 @@ const extractRoutesFromMenu = (menuItems) => {
|
|
|
106
106
|
return routes;
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
const generateId = (name, path) => {
|
|
110
|
+
const source = `${name}-${path || ""}`;
|
|
111
|
+
return source.toLowerCase().replace(/[^a-z0-9]/g, "-").replace(/--+/g, "-").replace(/^-|-$/g, "");
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export { extractRoutesFromMenu, generateId };
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateId: (name: string, path?: string) => string;
|