Skip to content

nextDuplicateTitle

nextDuplicateTitle(title): string

Defined in: packages/core/src/documents/cloneDocumentForDuplicate.ts:17

Appends or increments a duplicate suffix on a title: "Name" → "Name (2)", "Name (x)" → "Name (x+1)". BigInt, not Number, for the increment — a title duplicated past Number.MAX_SAFE_INTEGER times would otherwise silently round. Exported standalone for direct testing — cloneDocumentForDuplicate is its only production caller.

string

The source document’s current title value.

string

The next duplicate title.