Answers for "{filteredResults.map((result) => ( <NavLink to={result.replace(/\s+/g, "-").toLowerCase()} key={result}"

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 "{filteredResults.map((result) => ( <NavLink to={result.replace(/\s+/g, "-").toLowerCase()} key={result}"

Code answers related to "Javascript"

Browse Popular Code Answers by Language