(format: string | undefined)
| 471 | } |
| 472 | |
| 473 | function getContentTypeForFormat(format: string | undefined): string { |
| 474 | if (format === 'jpeg') return 'image/jpeg' |
| 475 | if (format === 'webp') return 'image/webp' |
| 476 | return 'image/png' |
| 477 | } |
| 478 | |
| 479 | function extensionFromContentType(contentType: string): string { |
| 480 | if (contentType.includes('jpeg') || contentType.includes('jpg')) return 'jpg' |
no outgoing calls
no test coverage detected