Skip to content

Commit

Permalink
Proxy all parameters of an event to the respective other emitter
Browse files Browse the repository at this point in the history
  • Loading branch information
sdepold committed Apr 16, 2014
1 parent 4270642 commit e81e72e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/emitters/custom-event-emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ module.exports = (function() {
options.events = Utils._.difference(options.events, options.skipEvents)

options.events.forEach(function (eventKey) {
this.on(eventKey, function (result) {
emitter.emit(eventKey, result)
this.on(eventKey, function () {
var args = [ eventKey ].concat([].slice.apply(arguments))
emitter.emit.apply(emitter, args)
})
}.bind(this))

Expand Down

0 comments on commit e81e72e

Please sign in to comment.