stream-together / lib / slugify.ts
1export default function slugify(str: string): string { 2 return str 3 .toLocaleLowerCase() 4 .trim() 5 .replace(/[^\w\s-]/g, "") 6 .replace(/[\s_-]+/g, "-"); 7}