<commit_before>function init_mods(api) {

    api.mods = {
        // This API is deprecated.  Use api.mods.getMounted() instead.
        getMountedMods: function (context, callback) {
            api.mods.getMounted(context, false).then(function(obj) {
              return obj.mounted_mods
            }).then(callback);
        },

        getMounted: function (context, raw) {
            return engine.call('mods.getMountedMods', context, !!raw).then(function(data) {
                var message;
                try {
                    message = JSON.parse(data);
                } catch (e) {
                    console.log("mods.getMountedMods: JSON parsing error");
                    console.log(data);
                    message = [];
                }
                return message;
            });
        },
        publishServerMods: function () { engine.call('mods.publishServerMods'); },
        sendModFileDataToServer: function (auth_token) { engine.call("mods.sendModFileDataToServer", auth_token); },<commit_msg>Changed api.mods.getMounted to return array<commit_after>function init_mods(api) {

    api.mods = {
        // This API is deprecated.  Use api.mods.getMounted() instead.
        getMountedMods: function (context, callback) {
            api.mods.getMounted(context, false).then(function(data) {
              return data;
            }).then(callback);
        },

        getMounted: function (context, raw) {
            return engine.call('mods.getMountedMods', context, !!raw).then(function(data) {
                var message;
                try {
                    message = JSON.parse(data).mounted_mods || [];
                } catch (e) {
                    console.error("mods.getMountedMods: JSON parsing error");
                    console.error(data);
                    message = [];
                }
                return message;
            });
        },
        publishServerMods: function () { engine.call('mods.publishServerMods'); },
        sendModFileDataToServer: function (auth_token) { engine.call("mods.sendModFileDataToServer", auth_token); },
{'fraction_non_alphanumeric': 0.11834040546911834, 'fraction_numerical': 0.0, 'mean_word_length': 1.7594278283485045, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4368371', 'n_tokens_mistral': 590, 'n_tokens_neox': 561, 'n_words': 104}