MCPcopy
hub / github.com/prisma/prisma / formatLines

Method formatLines

packages/cli/src/init/generated-files.ts:68–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66 }
67
68 formatLines(): string[] {
69 const lines: string[] = []
70
71 if (this.#format.level >= this.#format.printHeadersFromLevel) {
72 lines.push(this.#indent(this.#files.header()))
73 }
74
75 for (const entry of this.#files.entries()) {
76 const formatter = new Formatter(entry, { ...this.#format, level: this.#format.level + 1 })
77 lines.push(...formatter.formatLines())
78 }
79
80 return lines
81 }
82
83 #indent(line: string): string {
84 const indent = ' '.repeat(this.#format.indentSize * this.#format.level)

Callers 1

formatToStringMethod · 0.95

Calls 4

#indentMethod · 0.95
headerMethod · 0.80
entriesMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected