<commit_before>/* jshint ignore:start */

import Ember from 'ember';

var feature_flags = EMBER_CLI_CONDITIONAL_COMPILE_INJECTIONS;

var initializer = {
  name: 'ember-cli-conditional-compile-helpers',
  initialize: function(container, application) {
    Object.keys(feature_flags).map(function(flag) {
      Ember.Handlebars.registerHelper('if-flag-' + flag, function(options) {
        if (feature_flags[flag]) {
          return options.fn(this);
        } else {
          return options.inverse(this);
        }
      });
    });
  }
};

export default initializer;

/* jshint ignore:end */
<commit_msg>Put condition to check undefined inverse functions<commit_after>/* jshint ignore:start */

import Ember from 'ember';

var feature_flags = EMBER_CLI_CONDITIONAL_COMPILE_INJECTIONS;

var initializer = {
  name: 'ember-cli-conditional-compile-helpers',
  initialize: function(container, application) {
    Object.keys(feature_flags).map(function(flag) {
      Ember.Handlebars.registerHelper('if-flag-' + flag, function(options) {
        if (feature_flags[flag]) {
          return options.fn(this);
        } else if (options.inverse) {
          return options.inverse(this);
        }
      });
    });
  }
};

export default initializer;

/* jshint ignore:end */

{'fraction_non_alphanumeric': 0.12637362637362637, 'fraction_numerical': 0.0, 'mean_word_length': 3.336734693877551, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7234829', 'n_tokens_mistral': 400, 'n_tokens_neox': 394, 'n_words': 74}