<commit_before>var request = require('request'),
    BASE_URL = 'https://hummingbird.me/api/v2',
    ANIME_ID_URL = BASE_URL+'/anime/{id}',
    ANIME_MALID_URL = BASE_URL+'/anime/myanimelist:{malid}';

function _res(callback) {
    return function(error, response, body) {
        if (error)
            return callback(error);
        if (response.statusCode == 200) {
            try {
                var data = JSON.parse(body);
            } catch (err) {
                callback(err);
            }
			if(callback.length==3 && data.anime && data.linked.episodes)
				return callback(null, data.anime,data.linked.episodes);
			else if(callback.length==4 && data.anime && data.linked.episodes && data.linked.gallery_images)
				return callback(null, data.anime,data.linked.episodes,data.linked.gallery_images);
			else	
				return callback(null,data);
        }else if(response.statusCode== 404){
			return callback(null,[]);
		}else {
            try {
                error = JSON.parse(body);
            } catch (err) {
                callback(err);
            }		
		}
        return callback(error);
    }
}

function HB(key) {
    if (!key)
        throw new ReferenceError('API key is not defined');
    this.key = key;
};
<commit_msg>remove jshint errors<commit_after>var request = require('request'),
    BASE_URL = 'https://hummingbird.me/api/v2',
    ANIME_ID_URL = BASE_URL+'/anime/{id}',
    ANIME_MALID_URL = BASE_URL+'/anime/myanimelist:{malid}';

function _res(callback) {
    return function(error, response, body) {
        if (error)
            return callback(error);
        if (response.statusCode == 200) {
            try {
                var data = JSON.parse(body);
            } catch (err) {
                callback(err);
            }
			if(callback.length==3 && data.anime && data.linked.episodes)
				return callback(null, data.anime,data.linked.episodes);
			else if(callback.length==4 && data.anime && data.linked.episodes && data.linked.gallery_images)
				return callback(null, data.anime,data.linked.episodes,data.linked.gallery_images);
			else	
				return callback(null,data);
        }else if(response.statusCode== 404){
			return callback(null,[]);
		}else {
            try {
                error = JSON.parse(body);
            } catch (err) {
                callback(err);
            }		
		}
        return callback(error);
    }
}

function HB(key) {
    if (!key) {
        throw new ReferenceError('API key is not defined');    	
    }
    this.key = key;
};

{'fraction_non_alphanumeric': 0.13820492454328834, 'fraction_numerical': 0.007148530579825258, 'mean_word_length': 2.221227621483376, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6448072', 'n_tokens_mistral': 859, 'n_tokens_neox': 790, 'n_words': 148}