aboutsummaryrefslogtreecommitdiffhomepage
path: root/node_modules/setprototypeof/README.md
blob: 826bf029d966b554a740c689f6b147f1b3648c31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Polyfill for `Object.setPrototypeOf`

A simple cross platform implementation to set the prototype of an instianted object.  Supports all modern browsers and at least back to IE8.

## Usage:

```
$ npm install --save setprototypeof
```

```javascript
var setPrototypeOf = require('setprototypeof');

var obj = {};
setPrototypeOf(obj, {
	foo: function() {
		return 'bar';
	}
});
obj.foo(); // bar
```

TypeScript is also supported:
```typescript
import setPrototypeOf = require('setprototypeof');
```