MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / parseInline

Function parseInline

src/modules/mime.js:73–83  ·  view source on GitHub ↗
(raw, encoding)

Source from the content-addressed store, hash-verified

71}
72
73async function parseInline(raw, encoding) {
74 // raw is a JS binary string of UTF-8 bytes — decode to a display-ready Unicode string once here.
75 const text = new TextDecoder('utf-8').decode(str2Uint8Array(raw));
76 let message = '';
77 if (encoding === 'html') {
78 message = await mvelo.util.text2autoLinkHtml(text);
79 } else {
80 message = html2textIfHtml(text);
81 }
82 return {message, attachments: []};
83}
84
85/**
86 * Parse message with detached signature

Callers 1

parseMessageFunction · 0.85

Calls 3

str2Uint8ArrayFunction · 0.90
html2textIfHtmlFunction · 0.90
decodeMethod · 0.80

Tested by

no test coverage detected