# setprototypeof

> A small polyfill for Object.setprototypeof

Latest version **1.2.0** (published 2019-07-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install setprototypeof
pnpm add setprototypeof
yarn add setprototypeof
bun add setprototypeof
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2019-07-18 |
| First published | 2015-02-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51 |
| Author | Wes Todd |
| Maintainers | wesleytodd |
| Keywords | polyfill, object, setprototypeof |

## Links

- npm: https://www.npmjs.com/package/setprototypeof
- Repository: https://github.com/wesleytodd/setprototypeof
- Issues: https://github.com/wesleytodd/setprototypeof/issues
- npm.io page: https://npm.io/package/setprototypeof

## Recent versions

- 1.2.0 (latest) — 2019-07-18
- 1.1.1 — 2019-01-04
- 1.1.0 — 2017-09-13
- 1.0.3 — 2017-02-20
- 1.0.2 — 2016-11-13
- 1.0.1 — 2016-02-06
- 1.0.0 — 2015-02-04

## README

# Polyfill for `Object.setPrototypeOf`

[![NPM Version](https://img.shields.io/npm/v/setprototypeof.svg)](https://npmjs.org/package/setprototypeof)
[![NPM Downloads](https://img.shields.io/npm/dm/setprototypeof.svg)](https://npmjs.org/package/setprototypeof)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard)

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 from 'setprototypeof'
```

---
_Source: https://npm.io/package/setprototypeof · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
