@rws-air/utils
Version:
Utilities for rws-air libraries and applications
13 lines • 535 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.capitilizeFirstLetter = void 0;
/**
* Transforms the first letter to a capital then adds all the rest after it
* Differs from {@link sentenceCase} in that the casing of the text after the first letter is retained
* @param str Text to transform
*/
function capitilizeFirstLetter(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
exports.capitilizeFirstLetter = capitilizeFirstLetter;
//# sourceMappingURL=CapitilizeFirstLetter.js.map