UNPKG

@arianaprojects/prisma-nestjs-crud-generator

Version:
42 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class FileGeneral { constructor() { } get prettierOptions() { return this._prettierOptions; } set prettierOptions(value) { this._prettierOptions = value; } toCamelCase(str) { let s = str; if (typeof str != 'string') { if (str && str.name) { s = str.name; } } return (s .split(' ') .map((x, i) => { if (i > 0) return x.charAt(0).toUpperCase() + x.slice(1); else return x.charAt(0).toLowerCase() + x.slice(1); }) .join('')); } toPascalCase(str) { let s = str; if (typeof str != 'string') { if (str && str.name) { s = str.name; } } return (s .split(' ') .map((x) => x.charAt(0).toUpperCase() + x.slice(1)) .join('')); } } exports.default = FileGeneral; //# sourceMappingURL=FileGenerator.js.map