<commit_before>/* NODE MODULES */
var eventerface = require('eventerface'),
    jamp = require('./jamp');

/** LOCAL OBJECT 
 * @property {} - 
 */
var SERVERS = {
    
};

/** MODULE INTERFACE
 *@method {function} - 
 */
module.exports = {
    create: {
        zoneServer: createZoneServer
    }
}; 

/*----------------------------------------------------------------------------*/

/** Creates the servers required by a zone to operate
 * @param {object} zone - The zone requesting the servers to be created
 * @param {object} globalNamespace - The name of the global namespace where the other zone components will emit events
 * @returns {object} servers - A set of the zone's servers
 */
function createZoneServer(zone, globalNamespace) {
    var servers;

    eventerface.find(globalNamespace, function (zoneNamespace) {
        zoneNamespace.on('/elements/quadrantChange', function(change) {
            console.log('   quadrantChange', change.quadrant);
        });
        zoneNamespace.on('/zone/neighborChange', function(change) {
            console.log('zone_' + zone.id + ': neighborChange', change.neighbor);
            jamp.createChannel(zone, zoneNamespace, change.value.local, change.value.remote);
        });
    });

    return servers;
}<commit_msg>Routed the quadrantsChange event to jamps module's #handleQuadrantChange method<commit_after>/* NODE MODULES */
var eventerface = require('eventerface'),
    jamp = require('./jamp');

/** LOCAL OBJECT 
 * @property {} - 
 */
var SERVERS = {
    
};

/** MODULE INTERFACE
 *@method {function} - 
 */
module.exports = {
    create: {
        zoneServer: createZoneServer
    }
}; 

/*----------------------------------------------------------------------------*/

/** Creates the servers required by a zone to operate
 * @param {object} zone - The zone requesting the servers to be created
 * @param {object} globalNamespace - The name of the global namespace where the other zone components will emit events
 * @returns {object} servers - A set of the zone's servers
 */
function createZoneServer(zone, globalNamespace) {
    var servers;

    eventerface.find(globalNamespace, function (zoneNamespace) {
        zoneNamespace.on('/elements/quadrantChange', function(change) {
            // console.log('   quadrantChange', change.quadrant);
            jamp.handleQuadrantChange(zone, change);
        });
        zoneNamespace.on('/zone/neighborChange', function(change) {
            // console.log('zone_' + zone.id + ': neighborChange', change.neighbor);
            jamp.createChannel(zone, zoneNamespace, change.neighbor, change.value);
        });
    });

    return servers;
}


{'fraction_non_alphanumeric': 0.17624953025178505, 'fraction_numerical': 0.0, 'mean_word_length': 2.4571428571428573, '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': '2052057', 'n_tokens_mistral': 713, 'n_tokens_neox': 690, 'n_words': 194}