topic: function() { var collection = require('./test-helper').collection({ '-m=a a':1, '-m=bbbb a':1 }); collection.add(crema('-m=a a/*').pop(), 1); collection.add(crema('a/*').pop(), 1); collection.add(crema('-m=a a/*').pop(), 1); collection.add(crema('-m=a a/*').pop(), 1); collection.add(crema('-m=bbbb a/*').pop(), 1); return collection; },
self.on = function(typeOrObj, callback) { if(typeof typeOrObj == 'object') { for(var type in typeOrObj) { self.on(type, ypeOrObj[type]); } return; } crema(typeOrObj).forEach(function(route) { if(_routes.contains(route.channel, route.channel.tags)) throw new Error('Route ' + crema.stringifyPaths(route.channel.paths) + ' already exists'); _routes.add(route, callback); }); }