<commit_before>(function (env) {
    "use strict";

    env.ddg_spice_fedora_project_package_db = function (api_result) {

        // validate the response
        if (api_result.error || api_result.output == 'notok' || !api_result.packages || !api_result.packages.length) {
            return Spice.failed('fedora_project_package_db');
        }

        // get search query
        var query = DDG.get_query().replace(/^.+?\s/, "").replace(/\*+$/, "") + "*";

        Spice.add({
            id: "fedora_project_package_db",
            name: "Software",
            data: api_result.packages,
            meta: {
                searchTerm: query,
                sourceName: "Fedora Project",
                sourceUrl: 'https://admin.fedoraproject.org/pkgdb/packages/' + query + '/'
            },
            templates: {
                group: 'text',
                detail: false,<commit_msg>check for api_result<commit_after>(function (env) {
    "use strict";

    env.ddg_spice_fedora_project_package_db = function (api_result) {

        // validate the response
        if (!api_result || api_result.error || api_result.output == 'notok' || !api_result.packages || !api_result.packages.length) {
            return Spice.failed('fedora_project_package_db');
        }

        // get search query
        var query = DDG.get_query().replace(/^.+?\s/, "").replace(/\*+$/, "") + "*";

        Spice.add({
            id: "fedora_project_package_db",
            name: "Software",
            data: api_result.packages,
            meta: {
                searchTerm: query,
                sourceName: "Fedora Project",
                sourceUrl: 'https://admin.fedoraproject.org/pkgdb/packages/' + query + '/'
            },
            templates: {
                group: 'text',
                detail: false,
{'fraction_non_alphanumeric': 0.14199561403508773, 'fraction_numerical': 0.0, 'mean_word_length': 1.820710973724884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1218797', 'n_tokens_mistral': 549, 'n_tokens_neox': 518, 'n_words': 94}