-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Allow to wrap and compose function
var self = this;
this.on('reset', function() {});
this.on('pause', function() {});
this.behavior('reset', function() { self.trigger('reset'); });
this.behavior('newgame', function() {
self.trigger('reset');
self.trigger('pause');
});would become
this.on('reset', function() {});
this.on('pause', function() {});
this.behavior('reset', this.wrap(this.trigger, 'reset'));
this.behavior('newgame', this.compose([this.wrap(this.trigger, 'reset'), this.wrap(this.trigger, 'pause')]));Metadata
Metadata
Assignees
Labels
No labels