Adding to Custom Module

Multiple assignations to the module.exports variable won't work, you need to modify the functions defined in this object (oscInFilter, oscOutFilter, etc) so that all the desired instructions are followed. There is no automatic merging procedure but its possible to write a custom module that does it:

var submodules = [
    require('./custom_modA.js'),
    require('./custom_modB.js'),
    // etc
]


module.exports = {
    init: function(){
        for (var m of submodules) {
            if (m.init) m.init()
        }
    },
    unload: function(){
        for (var m of submodules) {
            if (m.unload) m.unload()
        }
    },
    oscInFilter: function(data){

        for (var m of submodules) {
            if (m.oscInFilter) data = m.oscInFilter(data)
            if (!data) return
        }

        return data

    },
    oscOutFilter: function(data){

        for (var m of submodules) {
            if (m.oscOutFilter) data = m.oscOutFilter(data)
            if (!data) return
        }

        return data
    }
}

(I'll add the example to the docs)