(prefix: string)
| 81 | } as const; |
| 82 | |
| 83 | export function generateId(prefix: string): string { |
| 84 | const ts = Date.now().toString(36); |
| 85 | const rand = crypto.randomUUID().replace(/-/g, "").slice(0, 12); |
| 86 | return `${prefix}_${ts}_${rand}`; |
| 87 | } |
| 88 | |
| 89 | export function fingerprintId(prefix: string, content: string): string { |
| 90 | const hash = createHash("sha256").update(content).digest("hex"); |
no outgoing calls
no test coverage detected