MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / generateDefaultName

Function generateDefaultName

src/hooks/useProfiles.ts:15–21  ·  view source on GitHub ↗

* Generate a default profile name like "Profile 1", "Profile 2", etc.

(existingNames: string[])

Source from the content-addressed store, hash-verified

13 * Generate a default profile name like "Profile 1", "Profile 2", etc.
14 */
15function generateDefaultName(existingNames: string[]): string {
16 let counter = 1;
17 while (existingNames.includes(`Profile ${counter}`)) {
18 counter++;
19 }
20 return `Profile ${counter}`;
21}
22
23/**
24 * Hook providing profile CRUD operations.

Callers 1

useProfilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected