01d794705dce4c83c6f698e8b373340f30dabc6a
[aai/esr-gui.git] /
1 # Polyfill for `Object.setPrototypeOf`
2
3 A simple cross platform implementation to set the prototype of an instianted object.  Supports all modern browsers and at least back to IE8.
4
5 ## Usage:
6
7 ```
8 $ npm install --save setprototypeof
9 ```
10
11 ```javascript
12 var setPrototypeOf = require('setprototypeof');
13
14 var obj = {};
15 setPrototypeOf(obj, {
16         foo: function() {
17                 return 'bar';
18         }
19 });
20 obj.foo(); // bar
21 ```