source: trip-planner-front/node_modules/setprototypeof/README.md@ ceaed42

Last change on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

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