Updates
This commit is contained in:
@@ -17,7 +17,7 @@ type Param = {
|
||||
folder?: string;
|
||||
isPrivate?: boolean;
|
||||
};
|
||||
user_id?: boolean;
|
||||
user_id?: string | number;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,7 @@ type Param = {
|
||||
folder?: string;
|
||||
isPrivate?: boolean;
|
||||
};
|
||||
user_id?: boolean;
|
||||
user_id?: string | number;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
* slugify("Yes!") // "yes"
|
||||
* slugify("Hello!!! World!") // "hello-world"
|
||||
*/
|
||||
export default function slugify(str: string): string {
|
||||
export default function slugify(str?: string): string {
|
||||
try {
|
||||
if (!str) return "";
|
||||
|
||||
return String(str)
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
|
||||
Reference in New Issue
Block a user