from kebab case (this-is-kebab-case) to camel case (thisIsCamelCase)
Last updated 3 years ago
Was this helpful?
⟩ ⟩ ⟩
// ⭐️ string.kebabToCamelCase() // kebab case | camel case // aaa-bbb-ccc | aaaBbbCcc String.prototype.kebabToCamelCase = function() { return this .split('-') .map((str, i) => (i === 0 ? str : str.capitalize()) ) .join(''); };
⟩
codepen ⟩
str.() ⭐️