(bytes: Buffer | Uint8Array | string)
| 59 | } |
| 60 | |
| 61 | function sha256(bytes: Buffer | Uint8Array | string): string { |
| 62 | return createHash('sha256').update(bytes).digest('hex'); |
| 63 | } |
| 64 | |
| 65 | function sanitizeSegment(value: string): string { |
| 66 | const sanitized = value.replaceAll(/[^a-zA-Z0-9._-]/g, '_'); |
no test coverage detected