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

Function enrichBootWithFeatures

packages/shared/src/lib/boot.ts:145–158  ·  view source on GitHub ↗
(boot: Boot)

Source from the content-addressed store, hash-verified

143};
144
145const enrichBootWithFeatures = async (boot: Boot): Promise<Boot> => {
146 if (!boot.exp?.f || !process.env.NEXT_PUBLIC_EXPERIMENTATION_KEY) {
147 return boot;
148 }
149
150 const features = await decrypt(
151 boot.exp.f,
152 process.env.NEXT_PUBLIC_EXPERIMENTATION_KEY,
153 'AES-CBC',
154 128,
155 );
156
157 return { ...boot, exp: { ...boot.exp, features: JSON.parse(features) } };
158};
159
160interface GetBootDataParams {
161 app: string;

Callers 1

getBootDataFunction · 0.85

Calls 1

decryptFunction · 0.90

Tested by

no test coverage detected