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

Function getCategoryKeyFromText

content/gmail-mail.js:214–225  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

212};
213
214function getCategoryKeyFromText(text) {
215 const normalizedText = normalizeText(text);
216 if (!normalizedText) return '';
217
218 for (const [key, patterns] of Object.entries(GMAIL_CATEGORY_LABELS)) {
219 if (patterns.some((pattern) => pattern.test(normalizedText))) {
220 return key;
221 }
222 }
223
224 return '';
225}
226
227function getCategoryTabLabel(tab) {
228 const text = normalizeText(

Callers 1

collectCategoryTabsFunction · 0.85

Calls 1

normalizeTextFunction · 0.70

Tested by

no test coverage detected