<commit_before>function findESNamedExports(node) {
  if (node.type !== 'ExportNamedDeclaration') {
    return [];
  }

  if (node.specifiers.length) {
    return node.specifiers.map(({ exported: { name } }) => name);
  }
  if (node.declaration) {
    return node.declaration.declarations.map(({ id: { name } }) => name);
  }
  return [];
}

function findCommonJSExports(node, definedObjectExpressions) {
  if (node.type !== 'ExpressionStatement') {
    return [];
  }
  // Potential CommonJS export
  const { left, right } = node.expression;
  if (!left || !right) {
    return [];
  }
  if (left.object.name === 'module' &&
    left.property.name === 'exports') {
    let objectExpression;
    if (right.type === 'ObjectExpression') {
      objectExpression = right;
    }
    if (right.type === 'Identifier') {
      objectExpression = definedObjectExpressions[right.name];
    }
    if (objectExpression) {<commit_msg>Make some arrow functions more consistent<commit_after>function findESNamedExports(node) {
  if (node.type !== 'ExportNamedDeclaration') {
    return [];
  }

  if (node.specifiers.length) {
    return node.specifiers.map(({ exported }) => exported.name);
  }
  if (node.declaration) {
    return node.declaration.declarations.map(({ id }) => id.name);
  }
  return [];
}

function findCommonJSExports(node, definedObjectExpressions) {
  if (node.type !== 'ExpressionStatement') {
    return [];
  }
  // Potential CommonJS export
  const { left, right } = node.expression;
  if (!left || !right) {
    return [];
  }
  if (left.object.name === 'module' &&
    left.property.name === 'exports') {
    let objectExpression;
    if (right.type === 'ObjectExpression') {
      objectExpression = right;
    }
    if (right.type === 'Identifier') {
      objectExpression = definedObjectExpressions[right.name];
    }
    if (objectExpression) {
{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.0, 'mean_word_length': 3.3732394366197185, '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': '1731879', 'n_tokens_mistral': 575, 'n_tokens_neox': 567, 'n_words': 119}