Browser-\/friendly inheritance fully compatible with standard node.\+js \href{http://nodejs.org/api/util.html\#util_util_inherits_constructor_superconstructor}{\texttt{ inherits}}.

This package exports standard {\ttfamily inherits} from node.\+js {\ttfamily util} module in node environment, but also provides alternative browser-\/friendly implementation through \href{https://gist.github.com/shtylman/4339901}{\texttt{ browser field}}. Alternative implementation is a literal copy of standard one located in standalone module to avoid requiring of {\ttfamily util}. It also has a shim for old browsers with no {\ttfamily Object.\+create} support.

While keeping you sure you are using standard {\ttfamily inherits} implementation in node.\+js environment, it allows bundlers such as \href{https://github.com/substack/node-browserify}{\texttt{ browserify}} to not include full {\ttfamily util} package to your client code if all you need is just {\ttfamily inherits} function. It worth, because browser shim for {\ttfamily util} package is large and {\ttfamily inherits} is often the single function you need from it.

It\textquotesingle{}s recommended to use this package instead of `require(\textquotesingle{}util').inherits\`{} for any code that has chances to be used not only in node.\+js but in browser too.\hypertarget{md_sfcode_node_modules_assert_node_modules_inherits_README_autotoc_md3256}{}\doxysubsection{usage}\label{md_sfcode_node_modules_assert_node_modules_inherits_README_autotoc_md3256}

\begin{DoxyCode}{0}
\DoxyCodeLine{var inherits = require('inherits');}
\DoxyCodeLine{// then use exactly as the standard one }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_assert_node_modules_inherits_README_autotoc_md3257}{}\doxysubsection{note on version $\sim$1.\+0}\label{md_sfcode_node_modules_assert_node_modules_inherits_README_autotoc_md3257}
Version $\sim$1.0 had completely different motivation and is not compatible neither with 2.\+0 nor with standard node.\+js {\ttfamily inherits}.

If you are using version $\sim$1.0 and planning to switch to $\sim$2.0, be careful\+:


\begin{DoxyItemize}
\item new version uses {\ttfamily super\+\_\+} instead of {\ttfamily super} for referencing superclass
\item new version overwrites current prototype while old one preserves any existing fields on it 
\end{DoxyItemize}