MCPcopy Index your code
hub / github.com/coder/code-server / generateUuid

Function generateUuid

src/common/util.ts:7–13  ·  view source on GitHub ↗
(length = 24)

Source from the content-addressed store, hash-verified

5export const plural = (count: number, str: string): string => (count === 1 ? str : `${str}s`)
6
7export const generateUuid = (length = 24): string => {
8 const possible = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
9 return Array(length)
10 .fill(1)
11 .map(() => possible[Math.floor(Math.random() * possible.length)])
12 .join("")
13}
14
15/**
16 * Remove extra slashes in a URL.

Callers 2

util.test.tsFile · 0.90
createProxyMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected