case-converters
Version:
Change case functions for all cases in TypeScript and JavaScript. Combined version of all [`case-converters`](https://github.com/cvchauhan/case-converter) methods, so you do not need to install them separately. ESM and CJS bundles are included, also bac
19 lines (18 loc) • 626 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCaseConverter = getCaseConverter;
const string_controller_1 = require("../controller/string.controller");
function getCaseConverter(caseType) {
switch (caseType.toLowerCase()) {
case "camel":
return string_controller_1.Case.camel;
case "capital":
return string_controller_1.Case.capital;
case "constant":
return string_controller_1.Case.constant;
case "dot":
return string_controller_1.Case.dot;
default:
return (str) => str;
}
}
;