@velopays/prisma-crud-generator
Version:
Generate CRUD operations and tests from Prisma models for NestJS
25 lines • 693 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.kebabCase = kebabCase;
exports.camelCase = camelCase;
exports.pascalCase = pascalCase;
exports.snakeCase = snakeCase;
function kebabCase(str) {
return str
.replace(/([a-z])([A-Z])/g, '$1-$2')
.replace(/[\s_]+/g, '-')
.toLowerCase();
}
function camelCase(str) {
return str.charAt(0).toLowerCase() + str.slice(1);
}
function pascalCase(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
function snakeCase(str) {
return str
.replace(/([a-z])([A-Z])/g, '$1_$2')
.replace(/[\s-]+/g, '_')
.toLowerCase();
}
//# sourceMappingURL=utils.js.map