@fivem-ts/shared
Version:
FiveM Typescript wrapper shared part
23 lines (22 loc) • 605 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.capitalizeFirstLetter = capitalizeFirstLetter;
/**
* Capitalizes the first letter of a string.
*
* @example
* ```ts
* const result = capitalizeFirstLetter("hello");
* console.log(result); // "Hello"
* ```
*
* @param {string} input - The string to capitalize the first letter of.
*
* @return {string} The string with its first letter capitalized.
*/
function capitalizeFirstLetter(input) {
if (input.length === 0) {
return input;
}
return input.charAt(0).toUpperCase() + input.slice(1);
}
;