<commit_before>var request = require('request');

module.exports = {
    shorten: function(url, cb) {
        request('http://tinyurl.com/api-create.php?url=' + url, function (error, response, body) {
			cb(body.split("\n")[0]);
        });
    }
};<commit_msg>Encode url before create tinyurl.<commit_after>var request = require('request');

module.exports = {
    shorten: function(url, cb) {
        request('http://tinyurl.com/api-create.php?url=' + encodeURIComponent(url), function (error, response, body) {
			cb(body.split("\n")[0]);
        });
    }
};
{'fraction_non_alphanumeric': 0.19395017793594305, 'fraction_numerical': 0.0035587188612099642, 'mean_word_length': 3.5403225806451615, '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': '3642026', 'n_tokens_mistral': 186, 'n_tokens_neox': 183, 'n_words': 32}