doc: reflect new require('events') behaviour
authorAlex Yursha <alexyursha@gmail.com>
Thu, 26 Feb 2015 21:47:35 +0000 (00:47 +0300)
committerBen Noordhuis <info@bnoordhuis.nl>
Mon, 16 Mar 2015 10:30:07 +0000 (11:30 +0100)
We don't need to do `require('events').EventEmitter` any longer.

PR-URL: https://github.com/iojs/io.js/pull/975
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
doc/api/events.markdown

index 2febc2f..e7470f3 100644 (file)
@@ -20,7 +20,11 @@ attached to.
 
 ## Class: events.EventEmitter
 
-To access the EventEmitter class, `require('events').EventEmitter`.
+Use `require('events')` to access the EventEmitter class.
+
+```javascript
+var EventEmitter = require('events');
+```
 
 When an `EventEmitter` instance experiences an error, the typical action is
 to emit an `'error'` event.  Error events are treated as a special case in