export const slugify = ( text ) : string => { return text . replace ( /[^-a-zA-Z0-9\s+]+/gi , "" ) . replace ( /\s+/gi , "-" ) . replace ( /--+/g , "-" ) . toLowerCase ( ) ; } ; export const cleanSlug = ( text ) : string => { return text . replace ( /^-+/ , "" ) . replace ( /-+$/ , "" ) ; } ;