urltomarkdown/node_modules/setprototypeof
Lee Hanken a6738a8c33 installed npm updates to dependencies 2022-01-08 17:17:05 +00:00
..
test initial commit 2022-01-08 18:05:05 +01:00
LICENSE initial commit 2022-01-08 18:05:05 +01:00
README.md installed npm updates to dependencies 2022-01-08 17:17:05 +00:00
index.d.ts initial commit 2022-01-08 18:05:05 +01:00
index.js installed npm updates to dependencies 2022-01-08 17:17:05 +00:00
package.json installed npm updates to dependencies 2022-01-08 17:17:05 +00:00

README.md

Polyfill for Object.setPrototypeOf

NPM Version NPM Downloads js-standard-style

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
var setPrototypeOf = require('setprototypeof')

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

TypeScript is also supported:

import setPrototypeOf from 'setprototypeof'