MCPcopy Create free account
hub / github.com/HKUDS/AgentSpace / generateWorkspaceJoinCode

Function generateWorkspaceJoinCode

packages/db/src/workspaces.ts:267–274  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

265}
266
267function generateWorkspaceJoinCode(): string {
268 const bytes = randomBytes(JOIN_CODE_LENGTH);
269 let code = "";
270 for (const byte of bytes) {
271 code += JOIN_CODE_ALPHABET[byte % JOIN_CODE_ALPHABET.length];
272 }
273 return code;
274}
275
276function normalizeWorkspaceJoinCode(joinCode: string): string {
277 return joinCode.trim().toUpperCase().replace(/[^A-Z0-9]/g, "");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected