MCPcopy Create free account
hub / github.com/FxEmbed/FxEmbed / experimentCheck

Function experimentCheck

src/experiments.ts:79–85  ·  view source on GitHub ↗
(experiment: Experiment, condition = true)

Source from the content-addressed store, hash-verified

77};
78
79export const experimentCheck = (experiment: Experiment, condition = true) => {
80 const experimentEnabled = Experiments[experiment].percentage > Math.random() && condition;
81 // console.log(
82 // `Experiment check: ${experiment} (resolved to ${experimentEnabled ? 'true' : 'false'})`
83 // );
84 return experimentEnabled;
85};

Callers 14

blueskyStatusRequestFunction · 0.90
statusRequestFunction · 0.90
genericTwitterRedirectFunction · 0.90
profileRequestFunction · 0.90
tiktokVideoRequestFunction · 0.90
getBrandingFunction · 0.90
shouldTranscodeGifFunction · 0.90
renderVideoFunction · 0.90
generateStatusMediaFunction · 0.90
handleStatusFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected