@sebgroup/frontend-tools
Version:
A set of frontend tools
16 lines (12 loc) • 458 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
/**
* 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);
}
exports.capitalize = capitalize;
//# sourceMappingURL=capitalize.js.map