Answers for "slug input"

2

slug javascript input

function convertToSlug(Text)
{
    return Text
        .toLowerCase()
        .replace(/ /g,'-')
        .replace(/[^\w-]+/g,'')
        ;
}
Posted by: Guest on July-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language