<commit_before>const Kapow = require('kapow');

const error = require('./error');

module.exports = function (formatter, config, data) {

  if (!data || data.length === 0 && data.singleResult) {
    return error(Kapow(404, 'Resource not found.'));
  }

  return {
    code: '200',
    data: formatter(data, {
      singleResult: data.singleResult,
      relations: data.relations,
      typeName: config.typeName
    })
  };
};<commit_msg>remove opts.typeName from formatter call<commit_after>const Kapow = require('kapow');

const error = require('./error');

module.exports = function (formatter, config, data) {

  if (!data || data.length === 0 && data.singleResult) {
    return error(Kapow(404, 'Resource not found.'));
  }

  return {
    code: '200',
    data: formatter(data, {
      singleResult: data.singleResult,
      relations: data.relations
    })
  };
};
{'fraction_non_alphanumeric': 0.15825688073394495, 'fraction_numerical': 0.016055045871559634, 'mean_word_length': 3.431472081218274, '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': '7292638', 'n_tokens_mistral': 287, 'n_tokens_neox': 268, 'n_words': 66}