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

Function normalizeLuckmailUsedPurchases

luckmail-utils.js:172–185  ·  view source on GitHub ↗
(rawValue = {})

Source from the content-addressed store, hash-verified

170 }
171
172 function normalizeLuckmailUsedPurchases(rawValue = {}) {
173 if (!rawValue || typeof rawValue !== 'object' || Array.isArray(rawValue)) {
174 return {};
175 }
176
177 return Object.entries(rawValue).reduce((result, [key, value]) => {
178 const normalizedKey = normalizeLuckmailPurchaseId(key);
179 if (!normalizedKey) {
180 return result;
181 }
182 result[normalizedKey] = Boolean(value);
183 return result;
184 }, {});
185 }
186
187 function isLuckmailPurchaseForProject(purchase, projectCode = DEFAULT_LUCKMAIL_PROJECT_CODE) {
188 const normalizedPurchase = normalizeLuckmailPurchase(purchase);

Callers 6

getLuckmailUsedPurchasesFunction · 0.85
resetStateFunction · 0.85

Calls 1

Tested by

no test coverage detected