@sebgroup/frontend-tools
Version:
A set of frontend tools
12 lines (10 loc) • 369 B
JavaScript
/**
* Capitalizes a string word. It doesn't capitalize a sentence, only the first letter.
* @param {string} str The string needed to be capitalized
* @returns {string} The capitalized string
*/
function capitalize(str) {
return str.charAt(0).toUpperCase() + str.substr(1, str.length - 1);
}
export { capitalize };
//# sourceMappingURL=capitalize.js.map