MCPcopy Create free account
hub / github.com/QLHazyCoder/FlowPilot / splitRawMessage

Function splitRawMessage

cloudflare-temp-email-utils.js:112–128  ·  view source on GitHub ↗
(raw = '')

Source from the content-addressed store, hash-verified

110 }
111
112 function splitRawMessage(raw = '') {
113 const source = String(raw || '');
114 if (!source) {
115 return { headerText: '', bodyText: '' };
116 }
117
118 const normalized = source.replace(/\r\n/g, '\n');
119 const separatorIndex = normalized.indexOf('\n\n');
120 if (separatorIndex === -1) {
121 return { headerText: normalized, bodyText: '' };
122 }
123
124 return {
125 headerText: normalized.slice(0, separatorIndex),
126 bodyText: normalized.slice(separatorIndex + 2),
127 };
128 }
129
130 function parseRawHeaders(headerText = '') {
131 const headers = {};

Callers 1

extractTextFromMimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected