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

Function extractVerificationCodeFromMessage

hotmail-utils.js:48–57  ·  view source on GitHub ↗
(message = {})

Source from the content-addressed store, hash-verified

46 }
47
48 function extractVerificationCodeFromMessage(message = {}) {
49 const sender = firstNonEmptyString([
50 message?.from?.emailAddress?.address,
51 message?.sender,
52 message?.from,
53 ]);
54 const subject = firstNonEmptyString([message?.subject]);
55 const preview = firstNonEmptyString([message?.bodyPreview, message?.preview, message?.text]);
56 return extractVerificationCode([subject, preview, sender].filter(Boolean).join(' '));
57 }
58
59 function getLatestHotmailMessage(messages) {
60 return (Array.isArray(messages) ? messages : [])

Callers 2

Calls 2

firstNonEmptyStringFunction · 0.70
extractVerificationCodeFunction · 0.70

Tested by

no test coverage detected