MCPcopy Create free account
hub / github.com/SplootCode/splootcode / loadFeatureFlags

Function loadFeatureFlags

packages/core/src/feature_flags/feature_flags.ts:20–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18*/
19
20export function loadFeatureFlags(): Map<string, boolean> {
21 const flags = new Map(supportedFlags.entries())
22 const serializedFlags = localStorage.getItem('SPLOOT_FEATURE_FLAGS')
23 if (serializedFlags) {
24 const obj = JSON.parse(serializedFlags) as Record<string, boolean>
25 for (const key of Object.keys(obj)) {
26 // Skip any flags that we don't use anymore.
27 if (flags.has(key)) {
28 flags.set(key, obj[key])
29 }
30 }
31 }
32 return flags
33}

Callers 2

SaveProjectModalFunction · 0.90
AddImportModalFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected