UNPKG

@visulima/email

Version:

A comprehensive email library with multi-provider support, crypto utilities, and template engines

2 lines (1 loc) 710 B
var n=Object.defineProperty;var o=(t,e)=>n(t,"name",{value:e,configurable:!0});import{convert as a}from"html-to-text";import l from"../packem_shared/EmailError-zm2ffVav.js";var s=Object.defineProperty,i=o((t,e)=>s(t,"name",{value:e,configurable:!0}),"o");const p=i((t,e)=>{try{return a(t,{longWordSplit:e?.longWordSplit,preserveNewlines:e?.preserveNewlines??!1,selectors:e?.selectors,wordwrap:e?.wordwrap??80})}catch(r){throw r instanceof Error&&r.message.includes("Cannot find module")?new l("html-to-text","html-to-text is not installed. Please install it: pnpm add html-to-text",{cause:r}):new l("html-to-text",`Failed to convert HTML to text: ${r.message}`,{cause:r})}},"htmlToText");export{p as default};