<commit_before>export function stepsByStartupOrder(steps, inverse = false) {
  const comparator = (a, b) =>
    a.startupOrder > b.startupOrder
      ? 1
      : a.startupOrder < b.startupOrder ? -1 : 0;

  return steps
    .values()
    .sort((a, b) => (inverse ? comparator(b, a) : comparator(a, b)));
}
<commit_msg>fix(stepsByStartupOrder): convert iterator to array<commit_after>export function stepsByStartupOrder(steps, inverse = false) {
  const comparator = (a, b) =>
    a.startupOrder > b.startupOrder
      ? 1
      : a.startupOrder < b.startupOrder ? -1 : 0;

  return Array.from(steps.values()).sort(
    (a, b) => (inverse ? comparator(b, a) : comparator(a, b))
  );
}

{'fraction_non_alphanumeric': 0.15204678362573099, 'fraction_numerical': 0.008771929824561403, 'mean_word_length': 3.391025641025641, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1912303', 'n_tokens_mistral': 249, 'n_tokens_neox': 234, 'n_words': 55}