(key: string, def: boolean)
| 119 | } |
| 120 | const f = parsed.flags; |
| 121 | const booleanFlag = (key: string, def: boolean): boolean => { |
| 122 | if (f[key] === true) return true; |
| 123 | if (f[`no-${key}`] === true) return false; |
| 124 | return def; |
| 125 | }; |
| 126 | const to = typeof f.to === "string" ? f.to.toLowerCase() : "pdf"; |
| 127 | if (to !== "pdf" && to !== "html" && to !== "docx") { |
| 128 | console.error(`$P generate: invalid --to '${f.to}'. Expected pdf, html, or docx.`); |
no outgoing calls
no test coverage detected