<commit_before>import generateCommonAuthentication from './generateCommonAuthentication';
import generateLocalAuthentication from './generateLocalAuthentication';
import generateFacebookAuthentication from './generateFacebookAuthentication';
import generateGoogleAuthentication from './generateGoogleAuthentication';
import generateTwitterAuthentication from './generateTwitterAuthentication';

async function generateAuthentication(params) {
  if (params.authentication && params.authentication.length) {
    await generateCommonAuthentication(params);
    await generateLocalAuthentication(params);
    await generateFacebookAuthentication(params);
    await generateGoogleAuthentication(params);
    await generateTwitterAuthentication(params);
  }
}

export default generateAuthentication;<commit_msg>Run auth generators only if value is present in the array<commit_after>import generateCommonAuthentication from './generateCommonAuthentication';
import generateLocalAuthentication from './generateLocalAuthentication';
import generateFacebookAuthentication from './generateFacebookAuthentication';
import generateGoogleAuthentication from './generateGoogleAuthentication';
import generateTwitterAuthentication from './generateTwitterAuthentication';

async function generateAuthentication(params) {
  if (params.authentication && params.authentication.length) {
    await generateCommonAuthentication(params);

    if (params.authentication.includes('email')) {
      await generateLocalAuthentication(params);
    }

    if (params.authentication.includes('facebook')) {
      await generateFacebookAuthentication(params);
    }

    if (params.authentication.includes('google')) {
      await generateGoogleAuthentication(params);
    }

    if (params.authentication.includes('twitter')) {
      await generateTwitterAuthentication(params);
    }
  }
}

export default generateAuthentication;
{'fraction_non_alphanumeric': 0.08105263157894736, 'fraction_numerical': 0.0, 'mean_word_length': 6.823045267489712, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4377485', 'n_tokens_mistral': 388, 'n_tokens_neox': 379, 'n_words': 95}