UNPKG

@enonic/js-utils

Version:
8 lines (7 loc) 243 B
// string/camelize.ts var camelize = (str, removeRegex = /\s+/g) => str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) { return index === 0 ? word.toLowerCase() : word.toUpperCase(); }).replace(removeRegex, ""); export { camelize };