<commit_before>Template.registerHelper(
    "displayHours", function (date) {
        return new moment(date).format("H[h]");
    }
);
Template.registerHelper(
    "skillLabel", function () {
        return Skills.findOne({_id:this.toString()}).label;
    }
);

Template.registerHelper(
    "displayUser", function () {
        return Users.findOne({_id:this.assignedUserId}).name;
    }
);


Template.registerHelper('ifNotEmpty', function(item, options) {
    if(item){
        if(item instanceof Array){
            if(item.length > 0){
                return options.fn(this);
            }else{
                return options.inverse(this);
            }
        }else{
            if(item.fetch().length > 0){
                return options.fn(this);
            } else {
                return options.inverse(this);
            }
        }
    }else{
        return options.inverse(this);<commit_msg>[RPI] global helpers, allTeams<commit_after>Template.registerHelper(
    "displayHours", function (date) {
        return new moment(date).format("H[h]");
    }
);
Template.registerHelper(
    "skillLabel", function () {
        return Skills.findOne({_id:this.toString()}).label;
    }
);

Template.registerHelper(
    "displayUser", function () {
        return Users.findOne({_id:this.assignedUserId}).name;
    }
);

Template.registerHelper(
    "allTeams", function () {
        return Teams.find();
    }
);


Template.registerHelper('ifNotEmpty', function(item, options) {
    if(item){
        if(item instanceof Array){
            if(item.length > 0){
                return options.fn(this);
            }else{
                return options.inverse(this);
            }
        }else{
            if(item.fetch().length > 0){
                return options.fn(this);
            } else {
                return options.inverse(this);
            }
        }
    }else{
        return options.inverse(this);
{'fraction_non_alphanumeric': 0.13922077922077922, 'fraction_numerical': 0.002077922077922078, 'mean_word_length': 1.9906832298136645, 'pattern_counts': {'":': 0, '<': 3, '<?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': '129450', 'n_tokens_mistral': 565, 'n_tokens_neox': 544, 'n_words': 91}