(txt: string, filename?: string)
| 41 | } |
| 42 | |
| 43 | export function saveTxt(txt: string, filename?: string) { |
| 44 | if (txt) { |
| 45 | const blob = new Blob([txt], { type: "text/plain;charset=utf-8" }) |
| 46 | filename = filename || "CodeBox-page" |
| 47 | saveAs(blob, `${filename}-${dayjs().format("YYYY-MM-DD HH:mm:ss")}.txt`) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | export function saveHtml(dom: Element, filename?: string) { |
| 52 | if (dom) { |
nothing calls this directly
no outgoing calls
no test coverage detected