From a28945b12876fea74091ba426eb636f8101262c9 Mon Sep 17 00:00:00 2001 From: Alex Yursha Date: Fri, 27 Feb 2015 00:47:35 +0300 Subject: [PATCH] doc: reflect new require('events') behaviour 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 Reviewed-By: Brendan Ashworth --- doc/api/events.markdown | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/api/events.markdown b/doc/api/events.markdown index 2febc2f991ca3a..e7470f37aa4877 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -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