(mimeType = "")
| 13 | }); |
| 14 | |
| 15 | const normalizeMimeType = (mimeType = "") => { |
| 16 | const normalized = `${mimeType}`.toLowerCase().trim(); |
| 17 | if (normalized === "image/jpg") return "image/jpeg"; |
| 18 | if (normalized === "application/svg+xml") return "image/svg+xml"; |
| 19 | return normalized; |
| 20 | }; |
| 21 | |
| 22 | const isSafeSvgBuffer = (buffer) => { |
| 23 | if (!Buffer.isBuffer(buffer) || buffer.length === 0) { |
no outgoing calls
no test coverage detected