mirror of
https://github.com/Dokploy/cli.git
synced 2026-06-19 14:15:20 +02:00
feat: add database create
This commit is contained in:
14
src/utils/slug.ts
Normal file
14
src/utils/slug.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import slug from "./slugify.js";
|
||||
|
||||
export const slugify = (text: string | undefined) => {
|
||||
if (!text) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const cleanedText = text.trim().replaceAll(/[^\d\sA-Za-z]/g, "");
|
||||
return slug(cleanedText, {
|
||||
lower: true,
|
||||
strict: true,
|
||||
trim: true,
|
||||
});
|
||||
};
|
||||
3
src/utils/slugify.ts
Normal file
3
src/utils/slugify.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import slugify from "slugify";
|
||||
|
||||
export default slugify as unknown as typeof slugify.default;
|
||||
Reference in New Issue
Block a user