Skip to content

Instantly share code, notes, and snippets.

@configbug
Forked from TheTempas/featureFlag.ts
Created June 25, 2024 19:54
Show Gist options
  • Select an option

  • Save configbug/dba361d5c4ea10d854999f9cc8f9b0aa to your computer and use it in GitHub Desktop.

Select an option

Save configbug/dba361d5c4ea10d854999f9cc8f9b0aa to your computer and use it in GitHub Desktop.

Revisions

  1. @TheTempas TheTempas revised this gist Dec 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion featureFlag.ts
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    const newFeature = await this.featureFlags.featureFlag(); // retrieve value of Feature Flag
    const newFeature = await this.featureFlags.newFeature(); // retrieve value of Feature Flag

    if (newFeature) {
    await this.newFeatureLogic(data); // execute logic for new feature
  2. @TheTempas TheTempas created this gist Dec 21, 2022.
    7 changes: 7 additions & 0 deletions featureFlag.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    const newFeature = await this.featureFlags.featureFlag(); // 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
    }