<commit_before>/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (c) 2014 Mozilla Corporation

*/
import { _ } from 'meteor/underscore';

// helper functions
getSetting=function (settingKey){

    // prefer Meteor.settings.public
    // then the subscribed collection
    if ( _.has(Meteor.settings.public,settingKey) ){
        return Meteor.settings.public.settingKey;
    }else{
        if ( mozdefsettings.findOne({ key : settingKey }) ){
            return mozdefsettings.findOne({ key : settingKey }).value;
        }else{
            return '';
        }
    }
};

<commit_msg>use the Meteor.settings.public.mozdef object in the client<commit_after>/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (c) 2014 Mozilla Corporation

*/
import { _ } from 'meteor/underscore';

// helper functions
getSetting=function (settingKey){

    // prefer Meteor.settings.public.mozdef
    // then the subscribed collection
    if ( _.has(Meteor.settings.public.mozdef,settingKey) ){
        return Meteor.settings.public.mozdef[settingKey];
    }else{
        if ( mozdefsettings.findOne({ key : settingKey }) ){
            return mozdefsettings.findOne({ key : settingKey }).value;
        }else{
            return '';
        }
    }
};


{'fraction_non_alphanumeric': 0.11053652230122818, 'fraction_numerical': 0.010342598577892695, 'mean_word_length': 2.7941176470588234, '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': '2455460', 'n_tokens_mistral': 477, 'n_tokens_neox': 444, 'n_words': 144}