<commit_before>'use strict';

$(document).on('ready', function () {

    var fileChecker = require('./lib/js/fileChecker');
    fileChecker.init();
    window.LOCAL_ITEM_SETS = fileChecker.getItemSets();
    
});


var fish = {};

fish.router = function(route) {
    console.log('fish::router: ' + route);
    if (route === 'makeNewItemSet') {
        $('.button-collapse').sideNav('hide');

    } else if (route === 'makeNewItemSet') {
        $('.button-collapse').sideNav('hide');

    } else if (route === 'importItemSet') {
        $('.button-collapse').sideNav('hide');
    } else if (route.indexOf('/') > -1) {
        $('.button-collapse').sideNav('hide');

        var _id = parseInt(route.split(':')[1], 10);
        console.log(_id);
        var all = LOCAL_ITEM_SETS.all;
        for (var i = all.length - 1; i >= 0; i--) {
            console.log(all[i]._id, _id);
            if (all[i]._id === _id) {
                console.log(all[i]);
                UI.display(all[i]);
                break;
            }
        }
    } else {
        UI.nav.setList(route);
    }


};

fish.file = {
    getGlobalItemSets: function () {
        var results = [];
        for (var i = 0; i < LOCAL_ITEM_SETS.all.length; i++) {
            var itemSet = LOCAL_ITEM_SETS.all[i];
            if (itemSet.isGlobalForChampions) {
                results.push(itemSet.title + ' ID:' + itemSet._id);
            }
        }
        return results;
    },
    getChampionsWithSets: function () {
        var results = [];
        if (LOCAL_ITEM_SETS.champs) {<commit_msg>Fixed exportItemSet not closing sideNav<commit_after>'use strict';

$(document).on('ready', function () {

    var fileChecker = require('./lib/js/fileChecker');
    fileChecker.init();
    window.LOCAL_ITEM_SETS = fileChecker.getItemSets();
    
});


var fish = {};

fish.router = function(route) {
    console.log('fish::router: ' + route);
    if (route === 'makeNewItemSet') {
        $('.button-collapse').sideNav('hide');

    } else if (route === 'makeNewItemSet') {
        $('.button-collapse').sideNav('hide');

    } else if (route === 'importItemSet') {
        $('.button-collapse').sideNav('hide');

    } else if (route === 'exportItemSet') {
        $('.button-collapse').sideNav('hide');

    } else if (route.indexOf('/') > -1) {
        $('.button-collapse').sideNav('hide');

        var _id = parseInt(route.split(':')[1], 10);
        console.log(_id);
        var all = LOCAL_ITEM_SETS.all;
        for (var i = all.length - 1; i >= 0; i--) {
            console.log(all[i]._id, _id);
            if (all[i]._id === _id) {
                console.log(all[i]);
                UI.display(all[i]);
                break;
            }
        }
    } else {
        UI.nav.setList(route);
    }
};

fish.file = {
    getGlobalItemSets: function () {
        var results = [];
        for (var i = 0; i < LOCAL_ITEM_SETS.all.length; i++) {
            var itemSet = LOCAL_ITEM_SETS.all[i];
            if (itemSet.isGlobalForChampions) {
                results.push(itemSet.title + ' ID:' + itemSet._id);
            }
        }
        return results;
    },
    getChampionsWithSets: function () {
        var results = [];
        if (LOCAL_ITEM_SETS.champs) {
{'fraction_non_alphanumeric': 0.18014140793114047, 'fraction_numerical': 0.004303719643406086, 'mean_word_length': 2.012962962962963, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2727331', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1045, 'n_words': 187}