MCPcopy Index your code
hub / github.com/sequelize/sequelize-auto / makeTableName

Function makeTableName

src/types.ts:234–240  ·  view source on GitHub ↗
(opt: CaseOption | undefined, tableNameOrig: string | null, singular = false, lang = "es5")

Source from the content-addressed store, hash-verified

232
233const tsNames = ["DataTypes", "Model", "Optional", "Sequelize"];
234export function makeTableName(opt: CaseOption | undefined, tableNameOrig: string | null, singular = false, lang = "es5") {
235 let name = recase(opt, tableNameOrig, singular);
236 if (isReserved(name) || (lang == "ts" && tsNames.includes(name))) {
237 name += "_";
238 }
239 return name;
240}
241
242/** build the array of indentation strings */
243export function makeIndent(spaces: boolean | undefined, indent: number | undefined): string[] {

Callers 4

createTsInitStringMethod · 0.90
createES5InitStringMethod · 0.90
createESMInitStringMethod · 0.90
generateTextMethod · 0.90

Calls 1

recaseFunction · 0.85

Tested by

no test coverage detected