<commit_before>const requestFormatter = (req) => (res) => {
  if (req.query.q) {
    res.query = req.query.q;
    if (res.query.slice(-1) != "?") {
      res.query = res.query + "?";
    }
  }
  return res;
};

const dilate = (req) => (s) => (res) => {
  if (req.query.big && req.query.big == 1) {
    res.response =
      res.response.substr(0, 3) +
      s +
      res.response.substr(3, res.response.length - 1);
  }
  return res;
};

const getPort = envPort => envPort || 3000;

module.exports = { requestFormatter, dilate, getPort };
<commit_msg>Refine returning responses through spread operator<commit_after>const requestFormatter = (req) => (res) => {
  if (req.query.q) {
    res.query = req.query.q;
    if (res.query.slice(-1) != "?") {
      res.query = res.query + "?";
    }
  }
  return {...res};
};

const dilate = (req) => (s) => (res) => {
  if (req.query.big && req.query.big == 1) {
    res.response =
      res.response.substr(0, 3) +
      s +
      res.response.substr(3, res.response.length - 1);
  }
  return {...res};
};

const getPort = envPort => envPort || 3000;

module.exports = { requestFormatter, dilate, getPort };

{'fraction_non_alphanumeric': 0.19843342036553524, 'fraction_numerical': 0.017406440382941687, 'mean_word_length': 2.59375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '6289511', 'n_tokens_mistral': 439, 'n_tokens_neox': 424, 'n_words': 87}