Skip to content

Instantly share code, notes, and snippets.

@configbug
Forked from TheTempas/featureFlag.ts
Created June 25, 2024 19:54
Show Gist options
  • Save configbug/dba361d5c4ea10d854999f9cc8f9b0aa to your computer and use it in GitHub Desktop.
Save configbug/dba361d5c4ea10d854999f9cc8f9b0aa to your computer and use it in GitHub Desktop.
Feature Flag
const newFeature = await this.featureFlags.newFeature(); // retrieve value of Feature Flag
if (newFeature) {
await this.newFeatureLogic(data); // execute logic for new feature
} else {
await this.statusQuoLogic(data); // execute logic that is the status quo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment