MCPcopy Index your code
hub / github.com/simstudioai/sim / convertHtmlToPlainText

Function convertHtmlToPlainText

apps/sim/lib/webhooks/polling/outlook.ts:95–107  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

93}
94
95function convertHtmlToPlainText(html: string): string {
96 if (!html) return ''
97 return htmlToText(html, {
98 wordwrap: false,
99 selectors: [
100 { selector: 'a', options: { hideLinkHrefIfSameAsText: true, noAnchorUrl: true } },
101 { selector: 'img', format: 'skip' },
102 { selector: 'script', format: 'skip' },
103 { selector: 'style', format: 'skip' },
104 ],
105 preserveNewlines: true,
106 })
107}
108
109export const outlookPollingHandler: PollingProviderHandler = {
110 provider: 'outlook',

Callers 1

processOutlookEmailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected