\begin{quote}
Node\textquotesingle{}s event emitter for all engines. \end{quote}
This implements the Node.\+js \href{https://nodejs.org/dist/v11.13.0/docs/api/events.html}{\texttt{ {\ttfamily events}}} module for environments that do not have it, like browsers.

\begin{quote}
{\ttfamily events} currently matches the {\bfseries{Node.\+js 11.\+13.\+0}} API. \end{quote}
Note that the {\ttfamily events} module uses ES5 features. If you need to support very old browsers like IE8, use a shim like \href{https://www.npmjs.com/package/es5-shim}{\texttt{ {\ttfamily es5-\/shim}}}. You need both the shim and the sham versions of {\ttfamily es5-\/shim}.

This module is maintained, but only by very few people. If you\textquotesingle{}d like to help, let us know in the \href{https://github.com/Gozala/events/issues/43}{\texttt{ Maintainer Needed}} issue!\hypertarget{md_sfcode_node_modules_events_Readme_autotoc_md9307}{}\doxysection{Install}\label{md_sfcode_node_modules_events_Readme_autotoc_md9307}
You usually do not have to install {\ttfamily events} yourself! If your code runs in Node.\+js, {\ttfamily events} is built in. If your code runs in the browser, bundlers like \href{https://github.com/browserify/browserify}{\texttt{ browserify}} or \href{https://github.com/webpack/webpack}{\texttt{ webpack}} also include the {\ttfamily events} module.

But if none of those apply, with npm do\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{npm install events }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_events_Readme_autotoc_md9308}{}\doxysection{Usage}\label{md_sfcode_node_modules_events_Readme_autotoc_md9308}

\begin{DoxyCode}{0}
\DoxyCodeLine{var EventEmitter = require('events')}
\DoxyCodeLine{}
\DoxyCodeLine{var ee = new EventEmitter()}
\DoxyCodeLine{ee.on('message', function (text) \{}
\DoxyCodeLine{  console.log(text)}
\DoxyCodeLine{\})}
\DoxyCodeLine{ee.emit('message', 'hello world') }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_events_Readme_autotoc_md9309}{}\doxysection{API}\label{md_sfcode_node_modules_events_Readme_autotoc_md9309}
See the \href{https://nodejs.org/dist/v11.13.0/docs/api/events.html}{\texttt{ Node.\+js Event\+Emitter docs}}. {\ttfamily events} currently matches the Node.\+js 11.\+13.\+0 API.\hypertarget{md_sfcode_node_modules_events_Readme_autotoc_md9310}{}\doxysection{Contributing}\label{md_sfcode_node_modules_events_Readme_autotoc_md9310}
PRs are very welcome! The main way to contribute to {\ttfamily events} is by porting features, bugfixes and tests from Node.\+js. Ideally, code contributions to this module are copy-\/pasted from Node.\+js and transpiled to ES5, rather than reimplemented from scratch. Matching the Node.\+js code as closely as possible makes maintenance simpler when new changes land in Node.\+js. This module intends to provide exactly the same API as Node.\+js, so features that are not available in the core {\ttfamily events} module will not be accepted. Feature requests should instead be directed at \href{https://github.com/nodejs/node}{\texttt{ nodejs/node}} and will be added to this module once they are implemented in Node.\+js.

If there is a difference in behaviour between Node.\+js\textquotesingle{}s {\ttfamily events} module and this module, please open an issue!\hypertarget{md_sfcode_node_modules_events_Readme_autotoc_md9311}{}\doxysection{License}\label{md_sfcode_node_modules_events_Readme_autotoc_md9311}
\href{./LICENSE}{\texttt{ MIT}} 