@routineless/cdk
Version:
14 lines • 579 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.toCamelCase = exports.capitalize = void 0;
const capitalize = (input) => {
if (!input)
return input;
return input.charAt(0).toUpperCase() + input.slice(1);
};
exports.capitalize = capitalize;
const toCamelCase = (input) => input.indexOf('-') >= 0 || input.indexOf('_') >= 0
? input.toLowerCase().replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', '').replace('_', ''))
: input;
exports.toCamelCase = toCamelCase;
//# sourceMappingURL=string-utils.js.map