UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

19 lines 594 B
export const cleanContext = (context) => { const { appName, ...otherContextFields } = context; const removedProperties = []; const cleanedContextFields = Object.fromEntries(Object.entries(otherContextFields).filter(([key, value]) => { if (key === 'properties' || typeof value === 'string') { return true; } removedProperties.push(key); return false; })); return { context: { ...cleanedContextFields, appName, }, removedProperties, }; }; //# sourceMappingURL=clean-context.js.map