xonecas.io
4828
Sr

stream-together / files

stream-together / lib / slugify.ts

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