habits-cli
Version:
The habits application seeks to help individuals build up healthy habits.
21 lines (20 loc) • 591 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.stringParser = void 0;
var capitalize = function (str) {
if (!str.length) {
return "";
}
return str[0].toUpperCase() + str.slice(1).toLowerCase();
};
var camelToSpaceSeparated = function (str) {
if (!str.length) {
return "";
}
return (str[0].toLowerCase() +
str.slice(1).replace(/[A-Z]/g, function (letter) { return " " + letter.toLowerCase(); }));
};
exports.stringParser = {
capitalize: capitalize,
camelToSpaceSeparated: camelToSpaceSeparated,
};