6edf70c82187ae853d9b53f4e065ec27ee7f8deccfe5477ebb3f0cd6d47d517b2c734404cf170513c4586709b46f964b9ebdf98609f2ea9da8983e8ca52915 500 B

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