<commit_before>module.exports = {

  response : function(res, text){
    var responseBody = { text : text };
    res.writeHead(200, {'Content-Type': 'application/json'});
    res.end( JSON.stringify(responseBody) );
  },

  // Find mentionned user to receive funds
  findTarget : function(text, callback){
    var target_ids = text.match(/\<@(.*)\>/);

    var target_id;
    if(target_ids != null && target_ids.length > 0)
    {

      target_id = target_ids.pop();
      
      User.find({ slack_id: target_id}, function(err, users){
        callback(users[0]);
      });
    }
    else
    {
      callback(null);
    } 
  },

  // Find amount to send
  findAmount : function(text){
    var numbers = text.match(/\d+/);<commit_msg>Fix dependency<commit_after>var models = require('./models.js');

module.exports = {

  response : function(res, text){
    var responseBody = { text : text };
    res.writeHead(200, {'Content-Type': 'application/json'});
    res.end( JSON.stringify(responseBody) );
  },

  // Find mentionned user to receive funds
  findTarget : function(text, callback){
    var target_ids = text.match(/\<@(.*)\>/);

    var target_id;
    if(target_ids != null && target_ids.length > 0)
    {

      target_id = target_ids.pop();
      
      models.User.find({ slack_id: target_id}, function(err, users){
        callback(users[0]);
      });
    }
    else
    {
      callback(null);
    } 
  },

  // Find amount to send
  findAmount : function(text){
    var numbers = text.match(/\d+/);
{'fraction_non_alphanumeric': 0.16248348745046234, 'fraction_numerical': 0.0066050198150594455, 'mean_word_length': 2.615751789976134, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5156750', 'n_tokens_mistral': 507, 'n_tokens_neox': 480, 'n_words': 103}