( url: string, )
| 619 | |
| 620 | const parseDataUrl = ( |
| 621 | url: string, |
| 622 | ): { mimeType: string; data: Buffer } | null => { |
| 623 | const match = url.match(/^data:([^;]+);base64,(.+)$/); |
| 624 | if (!match) return null; |
| 625 | return { mimeType: match[1], data: Buffer.from(match[2], "base64") }; |
| 626 | }; |
| 627 | |
| 628 | const normalizeDownloadedMedia = async ( |
| 629 | downloaded: any, |
| 630 | ): Promise<Buffer | null> => { |
no outgoing calls
no test coverage detected