(name: string, contents: string | Blob)
| 29 | return values; |
| 30 | }; |
| 31 | |
| 32 | export const zipObject = <K extends string | number, V>(keys: readonly K[], values: readonly V[]) => |
| 33 | zipObjectRaw(keys, values) as Record<K, V>; |
| 34 | |
| 35 | export const createAndDownloadFile = (name: string, contents: string | Blob) => { |
| 36 | const blob = new Blob([contents], { type: "text/plain" }); |
| 37 | |
| 38 | const link = document.createElement("a"); |
| 39 | link.download = name; |
| 40 | link.href = URL.createObjectURL(blob); |
| 41 | link.click(); |
| 42 | URL.revokeObjectURL(link.href); |
no outgoing calls
no test coverage detected