Updates
This commit is contained in:
@@ -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