<commit_before>'use strict';

var _ = require('lodash');
var glimpse = require('glimpse');

var processMessages = function(messages) { 
    return {
        messages: messages,
        groupedById: _.groupBy(messages, 'context.id')
    };
};

// republish Found Summary
(function () {
    function republishFoundSummary(messages) {
        var payload = processMessages(messages);

        glimpse.emit('data.message.summary.found', payload);
    }

    glimpse.on('data.message.summary.found.stream', republishFoundSummary);
    glimpse.on('data.message.summary.found.remote', republishFoundSummary);  //TODO: not yet implemented
})();

// republish Found Details
(function () {
    function republishFoundDetail(messages) {
        var payload = processMessages(messages);

        glimpse.emit('data.message.detail.found', payload);
    }

    glimpse.on('data.message.detail.found.stream', republishFoundDetail);
    glimpse.on('data.message.detail.found.remote', republishFoundDetail);  //TODO: not yet implemented
})();<commit_msg>Remove no longer needed comments<commit_after>'use strict';

var _ = require('lodash');
var glimpse = require('glimpse');

var processMessages = function(messages) { 
    return {
        messages: messages,
        groupedById: _.groupBy(messages, 'context.id')
    };
};

// republish Found Summary
(function () {
    function republishFoundSummary(messages) {
        var payload = processMessages(messages);

        glimpse.emit('data.message.summary.found', payload);
    }

    glimpse.on('data.message.summary.found.stream', republishFoundSummary);
    glimpse.on('data.message.summary.found.remote', republishFoundSummary);
})();

// republish Found Details
(function () {
    function republishFoundDetail(messages) {
        var payload = processMessages(messages);

        glimpse.emit('data.message.detail.found', payload);
    }

    glimpse.on('data.message.detail.found.stream', republishFoundDetail);
    glimpse.on('data.message.detail.found.remote', republishFoundDetail);
})();
{'fraction_non_alphanumeric': 0.13955773955773956, 'fraction_numerical': 0.0, 'mean_word_length': 3.906024096385542, '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': '3217763', 'n_tokens_mistral': 583, 'n_tokens_neox': 610, 'n_words': 104}