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

Function discriminator

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

Source from the content-addressed store, hash-verified

154
155/** A short random handle suffix (`x7k2`): ~1M combinations per base. */
156const discriminator = (): string => {
157 let out = "";
158 for (let i = 0; i < DISCRIMINATOR_LENGTH; i++) {
159 out += DISCRIMINATOR_ALPHABET[Math.floor(Math.random() * DISCRIMINATOR_ALPHABET.length)]!;
160 }
161 return out;
162};
163
164/**
165 * 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