Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo authored Dec 21, 2016
1 parent eee1be9 commit bbb881a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ ee(MyClass.prototype); // All instances of MyClass will expose event-emitter int
var emitter = new MyClass(), listener;

emitter.on('test', listener = function (args) {
//emitter logic
// react to 'test' event
});

emitter.once('test', function (args) {
// …invoked only once(!)
// react to first 'test' event (invoked only once!)
});

emitter.emit('test', arg1, arg2/*…args*/); // Two above listeners invoked
Expand Down

0 comments on commit bbb881a

Please sign in to comment.