MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / normalizeMailAddress

Function normalizeMailAddress

hotmail-utils.js:225–240  ·  view source on GitHub ↗
(rawValue)

Source from the content-addressed store, hash-verified

223 }
224
225 function normalizeMailAddress(rawValue) {
226 if (!rawValue) return '';
227 if (typeof rawValue === 'string') {
228 return rawValue.trim();
229 }
230 if (typeof rawValue === 'object') {
231 return firstNonEmptyString([
232 rawValue.emailAddress?.address,
233 rawValue.address,
234 rawValue.email,
235 rawValue.sender,
236 rawValue.from,
237 ]);
238 }
239 return '';
240 }
241
242 function stripHtmlTags(text) {
243 return String(text || '').replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim();

Callers 1

Calls 1

firstNonEmptyStringFunction · 0.70

Tested by

no test coverage detected