Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

string to kebab case

function toKebabCase(str){
    return str.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (m, chr) => '-' + chr).trim();
}
Source by javascriptf1.com #
 
PREVIOUS NEXT
Tagged: #string #kebab #case
ADD COMMENT
Topic
Name
7+6 =