<commit_before>var TinyURL = require('tinyurl');

exports.commands = {
    shorten: function (target, room, user, pm) {
        if (!Commands.hasPermission(user, 'broadcast')) return false;
        if (this.id === 'showdown') return this.send("Link shorteners are not allowed on this server, unfortunately.", room);
        if (!target) return this.send("You did not specify a link to shorten.", room);
        var self = this;
        try {
            TinyURL.shorten(target.remove(' '), function(res) {
                return self.send(res, room);
            });
        } catch (e) {
            this.send("Something went wrong when trying to shorten the link you provided...", room);
        }
    }
};<commit_msg>Make npm test happy<commit_after>var TinyURL = require('tinyurl');

exports.commands = {
	shorten: function (target, room, user, pm) {
		if (!Commands.hasPermission(user, 'broadcast')) return false;
		if (this.id === 'showdown') return this.send("Link shorteners are not allowed on this server, unfortunately.", room);
		if (!target) return this.send("You did not specify a link to shorten.", room);
		var self = this;
		try {
			TinyURL.shorten(target.remove(' '), function (res) {
				return self.send(res, room);
			});
		} catch (e) {
			return this.send("Something went wrong when trying to shorten the link you provided...", room);
		}
	}
};
{'fraction_non_alphanumeric': 0.14191660570592537, 'fraction_numerical': 0.0, 'mean_word_length': 3.059347181008902, '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': '628755', 'n_tokens_mistral': 417, 'n_tokens_neox': 392, 'n_words': 133}