(url: string, cd: string | null)
| 169 | // four formats (xlsx/ods are binary, csv/html are text) and |
| 170 | // honors the server's Content-Disposition filename. |
| 171 | const deriveFilename = (url: string, cd: string | null): string => { |
| 172 | const match = cd && /filename\*?="?([^";]+)"?/i.exec(cd); |
| 173 | if (match?.[1]) return match[1]; |
| 174 | const tail = url.split('?')[0]?.split('/').pop() ?? 'export'; |
| 175 | return tail; |
| 176 | }; |
| 177 | const open = |
| 178 | host.__exportOpen ?? |
| 179 | (typeof document !== 'undefined' && typeof fetch !== 'undefined' |
no outgoing calls
no test coverage detected