<commit_before>import _ from 'lodash';
import cartesian from './cartesian';
const types = ["suite", "subflow", "fork", "hook"];
const conditionalTypes = ["subflow", "hook","suite"];


const evaluateSubflow = function(name, getDetail) {
  const {suites, ...rest} = getDetail();
  if(!_.isArray(suites)) throw new Error(`no suites provided in subflow "${name}".`);
  
  
  const cartesianed = cartesian(
    ...suites.map(suite => [].concat(suite))
  ) || [];

  return cartesianed.map(combination => {
    return {
      name,
      type: 'subflow',
      ...rest,
      suites: combination,
    }
  })
}

const evaluateType = function(suite) {
  if(suite.type === "suite") {
    return [suite]
  }<commit_msg>Update evaluate.js<commit_after>import _ from 'lodash';
import cartesian from './cartesian';
const types = ["suite", "subflow", "fork", "hook"];
const conditionalTypes = ["subflow", "hook", "suite"];


const evaluateSubflow = function(name, getDetail) {
  const {suites, ...rest} = getDetail();
  if(!_.isArray(suites)) throw new Error(`no suites provided in subflow "${name}".`);
  
  
  const cartesianed = cartesian(
    ...suites.map(suite => [].concat(suite))
  ) || [];

  return cartesianed.map(combination => {
    return {
      name,
      type: 'subflow',
      ...rest,
      suites: combination,
    }
  })
}

const evaluateType = function(suite) {
  if(suite.type === "suite") {
    return [suite]
  }
{'fraction_non_alphanumeric': 0.18047752808988765, 'fraction_numerical': 0.0, 'mean_word_length': 3.4254658385093166, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3935848', 'n_tokens_mistral': 467, 'n_tokens_neox': 457, 'n_words': 112}