MCPcopy Index your code
hub / github.com/simstudioai/sim / shortId

Function shortId

packages/testing/src/factories/id.ts:9–18  ·  view source on GitHub ↗
(size = 8)

Source from the content-addressed store, hash-verified

7 * consistency with the app-level `generateShortId` utility.
8 */
9export function shortId(size = 8): string {
10 const bytes = new Uint8Array(size)
11 crypto.getRandomValues(bytes)
12
13 let id = ''
14 for (let i = 0; i < size; i++) {
15 id += URL_SAFE_ALPHABET[bytes[i] & 63]
16 }
17 return id
18}

Callers 13

createAddBlockEntryFunction · 0.90
createRemoveBlockEntryFunction · 0.90
createAddEdgeEntryFunction · 0.90
createMoveBlockEntryFunction · 0.90
createUpdateParentEntryFunction · 0.90
createPermissionFunction · 0.90
createWorkspaceRecordFunction · 0.90
createWorkflowRecordFunction · 0.90
createSessionFunction · 0.90
createLegacyApiKeyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected