MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / discriminator

Function discriminator

packages/core/api/src/account/org-slug.ts:161–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159
160/** A short random handle suffix (`x7k2`): ~1M combinations per base. */
161const discriminator = (): string => {
162 let out = "";
163 for (let i = 0; i < DISCRIMINATOR_LENGTH; i++) {
164 out += DISCRIMINATOR_ALPHABET[Math.floor(Math.random() * DISCRIMINATOR_ALPHABET.length)]!;
165 }
166 return out;
167};
168
169/**
170 * Mint a unique slug for an org name: try the clean derivation, then

Callers 1

generateOrgSlugFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected