<commit_before>
var request = require('request').defaults({baseUrl: 'https://api.dubtrack.fm/', json: true});

var DubAPIError = require('./errors/error.js'),
    DubAPIRequestError = require('./errors/requestError.js');

function RequestHandler(dubAPI) {
    this._ = {};
    this._.dubAPI = dubAPI;

    this._.cookieJar = request.jar();

    this._.ticking = false;
    this._.limit = 10;
    this._.queue = [];
    this._.chat = [];
    this._.sent = 0;
}

RequestHandler.prototype.queue = function(options, callback) {
    if (this._.sent >= this._.limit) return false;

    if (typeof options !== 'object') throw new TypeError('options must be an object');
    if (typeof options.url !== 'string') throw new TypeError('options.url must be a string');

    var sync = options.sync;
    delete options.sync;

    this._.queue.push({options: options, callback: callback, sync: sync});

    if (!this._.ticking) this._tick();

    return true;
};

RequestHandler.prototype.send = function(options, callback, next) {
    if (typeof options !== 'object') throw new TypeError('options must be an object');
    if (typeof options.url !== 'string') throw new TypeError('options.url must be a string');

    options.url = this.endpoint(options.url, options.user);
    options.jar = this._.cookieJar;

    var that = this,<commit_msg>Removed unused var<commit_after>
var request = require('request').defaults({baseUrl: 'https://api.dubtrack.fm/', json: true});

var DubAPIError = require('./errors/error.js'),
    DubAPIRequestError = require('./errors/requestError.js');

function RequestHandler(dubAPI) {
    this._ = {};
    this._.dubAPI = dubAPI;

    this._.cookieJar = request.jar();

    this._.ticking = false;
    this._.limit = 10;
    this._.queue = [];
    this._.sent = 0;
}

RequestHandler.prototype.queue = function(options, callback) {
    if (this._.sent >= this._.limit) return false;

    if (typeof options !== 'object') throw new TypeError('options must be an object');
    if (typeof options.url !== 'string') throw new TypeError('options.url must be a string');

    var sync = options.sync;
    delete options.sync;

    this._.queue.push({options: options, callback: callback, sync: sync});

    if (!this._.ticking) this._tick();

    return true;
};

RequestHandler.prototype.send = function(options, callback, next) {
    if (typeof options !== 'object') throw new TypeError('options must be an object');
    if (typeof options.url !== 'string') throw new TypeError('options.url must be a string');

    options.url = this.endpoint(options.url, options.user);
    options.jar = this._.cookieJar;

    var that = this,
{'fraction_non_alphanumeric': 0.1575160923892465, 'fraction_numerical': 0.002271866717152594, 'mean_word_length': 3.5395189003436425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1739387', 'n_tokens_mistral': 810, 'n_tokens_neox': 787, 'n_words': 214}