MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / dedupeHeader

Function dedupeHeader

packages/shared-domain/src/database-csv.ts:173–180  ·  view source on GitHub ↗
(name: string, used: Set<string>, index: number)

Source from the content-addressed store, hash-verified

171}
172
173function dedupeHeader(name: string, used: Set<string>, index: number): string {
174 let base = name.trim() || `Column ${index + 1}`
175 let candidate = base
176 let n = 2
177 while (used.has(candidate)) candidate = `${base} (${n++})`
178 used.add(candidate)
179 return candidate
180}
181
182export interface InferredSchema {
183 idFieldId: string

Callers 1

inferFieldsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected