\begin{quote}
Node.\+js\textquotesingle{}s \href{https://nodejs.org/docs/latest-v8.x/api/util.html}{\texttt{ util}} module for all engines. \end{quote}
This implements the Node.\+js \href{https://nodejs.org/docs/latest-v8.x/api/util.html}{\texttt{ {\ttfamily util}}} module for environments that do not have it, like browsers.\hypertarget{md_sfcode_node_modules_util_README_autotoc_md31633}{}\doxysection{Install}\label{md_sfcode_node_modules_util_README_autotoc_md31633}
You usually do not have to install {\ttfamily util} yourself. If your code runs in Node.\+js, {\ttfamily util} 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 util} module.

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


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

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

\begin{DoxyCode}{0}
\DoxyCodeLine{var util = require('util')}
\DoxyCodeLine{var EventEmitter = require('events')}
\DoxyCodeLine{}
\DoxyCodeLine{function MyClass() \{ EventEmitter.call(this) \}}
\DoxyCodeLine{util.inherits(MyClass, EventEmitter) }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_util_README_autotoc_md31635}{}\doxysection{Browser Support}\label{md_sfcode_node_modules_util_README_autotoc_md31635}
The {\ttfamily util} 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}.

To use {\ttfamily util.\+promisify} and {\ttfamily util.\+callbackify}, Promises must already be available. If you need to support browsers like IE11 that do not support Promises, use a shim. \href{https://github.com/stefanpenner/es6-promise}{\texttt{ es6-\/promise}} is a popular one but there are many others available on npm.\hypertarget{md_sfcode_node_modules_util_README_autotoc_md31636}{}\doxysection{API}\label{md_sfcode_node_modules_util_README_autotoc_md31636}
See the \href{https://nodejs.org/docs/latest-v8.x/api/util.html}{\texttt{ Node.\+js util docs}}. {\ttfamily util} currently supports the Node 8 LTS API. However, some of the methods are outdated. The {\ttfamily inspect} and {\ttfamily format} methods included in this module are a lot more simple and barebones than the ones in Node.\+js.\hypertarget{md_sfcode_node_modules_util_README_autotoc_md31637}{}\doxysection{Contributing}\label{md_sfcode_node_modules_util_README_autotoc_md31637}
PRs are very welcome! The main way to contribute to {\ttfamily util} 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 util} 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 util} module and this module, please open an issue!\hypertarget{md_sfcode_node_modules_util_README_autotoc_md31638}{}\doxysection{License}\label{md_sfcode_node_modules_util_README_autotoc_md31638}
\href{./LICENSE}{\texttt{ MIT}} 