MCPcopy Create free account
hub / github.com/vercel/examples / createIdentity

Function createIdentity

websockets/nuxt/server/utils/identity.ts:17–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 * Swap this for your authenticated user when adapting the starter.
16 */
17export function createIdentity(): Peer {
18 const adjective = ADJECTIVES[Math.floor(Math.random() * ADJECTIVES.length)]
19 const animal = ANIMALS[Math.floor(Math.random() * ANIMALS.length)]
20 // Spread the hue across the wheel for distinct, readable cursor colors.
21 const hue = Math.floor(Math.random() * 360)
22
23 return {
24 id: crypto.randomUUID(),
25 name: `${adjective} ${animal}`,
26 color: `hsl(${hue} 85% 60%)`,
27 }
28}

Callers 1

openFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected