Camel Case to Words

Convert a camelCase string to separate words by inserting spaces before capitals.

Code

Utilities
str.replace(/([A-Z])/g, ' $1').trim();

Parameters

camelCase string to convert.

Browser·fetch() may be limited by CORS

More JavaScript Snippets