MCPcopy Create free account
hub / github.com/dailydotdev/apps / withoutClientOnlyFlags

Function withoutClientOnlyFlags

packages/shared/src/contexts/SettingsContext.tsx:315–326  ·  view source on GitHub ↗
(
  settings: T,
)

Source from the content-addressed store, hash-verified

313};
314
315const withoutClientOnlyFlags = <T extends Partial<RemoteSettings>>(
316 settings: T,
317): T => {
318 if (!settings.flags) {
319 return settings;
320 }
321
322 const flags = { ...settings.flags };
323 clientOnlySettingsFlags.forEach((flag) => delete flags[flag]);
324
325 return { ...settings, flags };
326};
327
328// Identity is not enough for arrays and objects (custom links, prompt flags,
329// shortcuts), which callers rebuild on every write. Key order can make this

Callers 1

updateRemoteSettingsFnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected