Answers for "slugify js"

2

java script converting text to slug

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