Skip to content

Instantly share code, notes, and snippets.

@pandauxstudio
Created May 15, 2019 16:22
Show Gist options
  • Save pandauxstudio/011142d58570b6b45343e4609e587667 to your computer and use it in GitHub Desktop.
Save pandauxstudio/011142d58570b6b45343e4609e587667 to your computer and use it in GitHub Desktop.
function camelCaseToSentenceCase(word) {
const result = word.replace(/([A-Z])/g, ' $1');
const finalResult = result.charAt(0).toUpperCase() + result.slice(1);
return (
<span>{finalResult}</span>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment