Transform string to Title Case, it also normalises whitespaces (replace consecutive spaces with single space) and .trim() the output
.trim()
Optional
blakeembrey/change-case
Transform string to Title Case, it also normalises whitespaces (replace consecutive spaces with single space) and
.trim()the output