A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8.\hypertarget{md_sfcode_node_modules_serve_index_node_modules_setprototypeof_README_autotoc_md26861}{}\doxysection{Usage\+:}\label{md_sfcode_node_modules_serve_index_node_modules_setprototypeof_README_autotoc_md26861}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save setprototypeof }

\end{DoxyCode}



\begin{DoxyCode}{0}
\DoxyCodeLine{var setPrototypeOf = require('setprototypeof');}
\DoxyCodeLine{}
\DoxyCodeLine{var obj = \{\};}
\DoxyCodeLine{setPrototypeOf(obj, \{}
\DoxyCodeLine{    foo: function() \{}
\DoxyCodeLine{        return 'bar';}
\DoxyCodeLine{    \}}
\DoxyCodeLine{\});}
\DoxyCodeLine{obj.foo(); // bar }

\end{DoxyCode}


Type\+Script is also supported\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{import setPrototypeOf = require('setprototypeof'); }

\end{DoxyCode}
 