Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 850B

12345678910111213141516171819202122232425262728293031
  1. # Polyfill for `Object.setPrototypeOf`
  2. [![NPM Version](https://img.shields.io/npm/v/setprototypeof.svg)](https://npmjs.org/package/setprototypeof)
  3. [![NPM Downloads](https://img.shields.io/npm/dm/setprototypeof.svg)](https://npmjs.org/package/setprototypeof)
  4. [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard)
  5. A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8.
  6. ## Usage:
  7. ```
  8. $ npm install --save setprototypeof
  9. ```
  10. ```javascript
  11. var setPrototypeOf = require('setprototypeof')
  12. var obj = {}
  13. setPrototypeOf(obj, {
  14. foo: function () {
  15. return 'bar'
  16. }
  17. })
  18. obj.foo() // bar
  19. ```
  20. TypeScript is also supported:
  21. ```typescript
  22. import setPrototypeOf = require('setprototypeof')
  23. ```