(value: unknown)
| 105 | } |
| 106 | |
| 107 | function normalizeOptionalString(value: unknown): string | undefined { |
| 108 | if (typeof value !== "string") { |
| 109 | return undefined; |
| 110 | } |
| 111 | |
| 112 | const trimmed = value.trim(); |
| 113 | return trimmed.length > 0 ? trimmed : undefined; |
| 114 | } |
| 115 | |
| 116 | function hashSessionToken(sessionToken: string): string { |
| 117 | return crypto.createHash("sha256").update(sessionToken).digest("hex"); |
no outgoing calls
no test coverage detected