from kebab case (this-is-kebab-case) to camel case (thisIsCamelCase)
🔰 JS ⟩ Types ⟩ String ⟩ methods
// ⭐️ 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(''); };
String ⟩ .capitalize()
codepen ⟩ data attributes
str.replace() ⭐️
Last updated 3 years ago