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

Function parseRawHeaders

cloudflare-temp-email-utils.js:130–149  ·  view source on GitHub ↗
(headerText = '')

Source from the content-addressed store, hash-verified

128 }
129
130 function parseRawHeaders(headerText = '') {
131 const headers = {};
132 const lines = String(headerText || '').split('\n');
133 let currentName = '';
134
135 for (const line of lines) {
136 if (!line) continue;
137 if ((line.startsWith(' ') || line.startsWith('\t')) && currentName) {
138 headers[currentName] += ` ${line.trim()}`;
139 continue;
140 }
141
142 const separatorIndex = line.indexOf(':');
143 if (separatorIndex <= 0) continue;
144 currentName = line.slice(0, separatorIndex).trim().toLowerCase();
145 headers[currentName] = line.slice(separatorIndex + 1).trim();
146 }
147
148 return headers;
149 }
150
151 function decodeMimeEncodedWords(value = '') {
152 const source = String(value || '');

Callers 1

extractTextFromMimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected