{"size": 820, "ext": "js", "max_stars_repo_path": "root/static/scripts/statistics.js", "max_stars_repo_name": "qls0ulp/musicbrainz-server", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "root/static/scripts/statistics.js", "max_issues_repo_name": "qls0ulp/musicbrainz-server", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "root/static/scripts/statistics.js", "max_forks_repo_name": "qls0ulp/musicbrainz-server", "max_forks_repo_forks_event_min_datetime": "2020-01-18T14:59:32.000Z", "max_forks_repo_forks_event_max_datetime": "2020-01-18T14:59:32.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 23.4285714286, "max_line_length": 61, "alphanum_fraction": 0.487804878}
const tablesorter = require('tablesorter');

tablesorter.addWidget({
    id: "indexFirstColumn",
    format: function (table) {
        $('tbody tr', table).each(function (index) {
            $(this).find('td:first').html((index + 1));
        });
    }
});

tablesorter.addWidget({
    id: "evenRowClasses",
    format: function (table) {
        $('tbody tr', table).each(function (index) {
            if ((index + 1) % 2 == 0) {
                $(this).addClass("even");
            } else {
                $(this).removeClass("even");
            }
        });
    }
});

tablesorter.addParser({
    id: "fancyNumber",
    is: function (s) {
        return /^[0-9]?[0-9,\.]*$/.test(s);
    },
    format: function (s) {
        return tablesorter.formatFloat( s.replace(/,/g,'') );
    },
    type: "numeric"
});
