Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js camalcase

const camelize = (str) => {
  return str.replace(/(?:^w|[A-Z]|w)/g, function(word, index) {
    return index === 0 ? word.toLowerCase() : word.toUpperCase();
  }).replace(/s+/g, '');
}
 
PREVIOUS NEXT
Tagged: #js #camalcase
ADD COMMENT
Topic
Name
1+7 =