['event1', 'event2']
.forEach(function (event) {
socket.data(event, data.bind(self, event));
})
But what about generic event names? It is not possible to predict event. We've found a way in examples:
outbound.data(['drink', '*'], function () {
console.log('I can mix a', this.event[2], 'drink');
});
There is no information about this.event in docs. This is very important, please fix.