(text: string)
| 52 | |
| 53 | |
| 54 | function stripHTML(text: string) { |
| 55 | const dom = new JSDOM(text); |
| 56 | const textContent = dom.window.document.body.textContent || ''; |
| 57 | const cleanText = textContent.trim(); |
| 58 | return cleanText; |
| 59 | } |
| 60 | |
| 61 | |
| 62 | // Define a type for the image data |