<commit_before>module.exports = {
    search: function(series, options, callback) {
        var params = fixParameters(options, callback);
        var values = search.queryObject(series);
        makeApiCall(params.options, search, values, params.callback);
    },
    getEpisodeList: function(seriesId, options, callback) {
        var params = fixParameters(options, callback);
        var values = eplist.queryObject(seriesId);
        makeApiCall(params.options, eplist, values, params.callback);
    },
    getSeriesDetails: function(seriesId, options, callback) {
        var params = fixParameters(options, callback);
        var values = eplist.queryObject(seriesId);
        makeApiCall(params.options, seriesinfo, values, params.callback);
    },
    getEpisode: function(query, options, callback) {
        var params = fixParameters(options, callback);
        getEpisodeDetails(query, options, callback);
    }
};

function fixParameters(options, callback) {
    var onlyHaveCallback = (typeof(options) === "function" && callback === undefined);

    return {<commit_msg>use params fields for options, callback<commit_after>module.exports = {
    search: function(series, options, callback) {
        var params = fixParameters(options, callback);
        var values = search.queryObject(series);
        makeApiCall(params.options, search, values, params.callback);
    },
    getEpisodeList: function(seriesId, options, callback) {
        var params = fixParameters(options, callback);
        var values = eplist.queryObject(seriesId);
        makeApiCall(params.options, eplist, values, params.callback);
    },
    getSeriesDetails: function(seriesId, options, callback) {
        var params = fixParameters(options, callback);
        var values = eplist.queryObject(seriesId);
        makeApiCall(params.options, seriesinfo, values, params.callback);
    },
    getEpisode: function(query, options, callback) {
        var params = fixParameters(options, callback);
        getEpisodeDetails(query, params.options, params.callback);
    }
};

function fixParameters(options, callback) {
    var onlyHaveCallback = (typeof(options) === "function" && callback === undefined);

    return {
{'fraction_non_alphanumeric': 0.11367753623188406, 'fraction_numerical': 0.0, 'mean_word_length': 3.72008547008547, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '174771', 'n_tokens_mistral': 581, 'n_tokens_neox': 572, 'n_words': 139}