MCPcopy Index your code
hub / github.com/tldraw/tldraw / getName

Method getName

internal/scripts/refresh-assets.ts:682–690  ·  view source on GitHub ↗
(name: string, suffix?: number)

Source from the content-addressed store, hash-verified

680 }
681
682 getName(name: string, suffix?: number): string {
683 const formatted = this.formatName(`${name}${suffix ?? ''}`)
684
685 if (this.toString().match(formatted)) {
686 return this.getName(name, (suffix ?? 1) + 1)
687 }
688
689 return formatted
690 }
691
692 appendFn(header: string): CodeFunction {
693 const fn = new CodeFunction(this, header)

Callers 3

importMethod · 0.95
CustomPeopleMenuFunction · 0.45
memoMethod · 0.45

Calls 2

formatNameMethod · 0.95
toStringMethod · 0.95

Tested by

no test coverage detected