<commit_before># ember-cli-flagpole

🎏 This addon provides a harness for expressing feature flags for an Ember application in an opinionated way. It is especially useful for configuring feature flags per-environment, along with default values for all environments.

<a id="example"></a>

```javascript
// config/flagpole.js
module.exports = function(flag) {
  flag('myCoolFeature')
    .default(true)
    .env('production', false);

  flag('anotherGreatFeature')
    .env('development', true)
    .env('staging', false)
    .env('production', false);
};

// then, at runtime...
import config from 'my-app/config/environment';

console.log(config.featureFlags); // ->
// in 'development': { myCoolFeature: true, anotherGreatFeature: true }
// in 'staging': { myCoolFeature: true, anotherGreatFeature: false }
// in 'production': { myCoolFeature: false, myCoolFeature: false }
```

Part of `ember-cli-flagpole`'s intent is to provide some build-time safety for configuring feature flags "in the large" by making certain expressions that are likely to be mistakes, like duplicate flag declarations or redeclaring a default value for a flag that already has one, build-time errors.

## Why do I need this?
Chances are good that you _don't_, in case you don't have very many feature flags or you don't need to manage feature flags for mixes of different environments.

But, if you _do_ fit either of those descriptions, you may feel a need for a mechanism to configure per-environment feature flags that's more succinct than passing the config object through a bunch of conditional checks and writes. You may have already written some custom glue code to enable default settings. You may have concocted a custom object format for configuring flags more conveniently.

`ember-cli-flagpole` is designed to make those cases fit with the Ember philosophy of "convention over configuration". There's no escaping the actual configuration of flags, but you shouldn't have to configure _how_ those flags are transformed to be appropriate per build environment. `ember-cli-flagpole` helps to centralize where your flags are declared and offers a simple mechanism for declaring them.

## Installation

* `ember install ember-cli-flagpole`

A default blueprint is included that generates the `config/flagpole.js` file for you.<commit_msg>Fix typo in README<commit_after># ember-cli-flagpole

🎏 This addon provides a harness for expressing feature flags for an Ember application in an opinionated way. It is especially useful for configuring feature flags per-environment, along with default values for all environments.

<a id="example"></a>

```javascript
// config/flagpole.js
module.exports = function(flag) {
  flag('myCoolFeature')
    .default(true)
    .env('production', false);

  flag('anotherGreatFeature')
    .env('development', true)
    .env('staging', false)
    .env('production', false);
};

// then, at runtime...
import config from 'my-app/config/environment';

console.log(config.featureFlags); // ->
// in 'development': { myCoolFeature: true, anotherGreatFeature: true }
// in 'staging': { myCoolFeature: true, anotherGreatFeature: false }
// in 'production': { myCoolFeature: false, anotherGreatFeature: false }
```

Part of `ember-cli-flagpole`'s intent is to provide some build-time safety for configuring feature flags "in the large" by making certain expressions that are likely to be mistakes, like duplicate flag declarations or redeclaring a default value for a flag that already has one, build-time errors.

## Why do I need this?
Chances are good that you _don't_, in case you don't have very many feature flags or you don't need to manage feature flags for mixes of different environments.

But, if you _do_ fit either of those descriptions, you may feel a need for a mechanism to configure per-environment feature flags that's more succinct than passing the config object through a bunch of conditional checks and writes. You may have already written some custom glue code to enable default settings. You may have concocted a custom object format for configuring flags more conveniently.

`ember-cli-flagpole` is designed to make those cases fit with the Ember philosophy of "convention over configuration". There's no escaping the actual configuration of flags, but you shouldn't have to configure _how_ those flags are transformed to be appropriate per build environment. `ember-cli-flagpole` helps to centralize where your flags are declared and offers a simple mechanism for declaring them.

## Installation

* `ember install ember-cli-flagpole`

A default blueprint is included that generates the `config/flagpole.js` file for you.
{'fraction_non_alphanumeric': 0.07690655209452202, 'fraction_numerical': 0.0, 'mean_word_length': 4.678048780487805, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '584252', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1148, 'n_words': 592}