iching-broker-level2/node_modules/setprototypeof
Christopher Hase 9aeeb95994
Some checks are pending
ci / build (push) Waiting to run
add http-server part 5.9
2025-04-09 16:12:34 +02:00
..
test add http-server part 5.9 2025-04-09 16:12:34 +02:00
index.d.ts add http-server part 5.9 2025-04-09 16:12:34 +02:00
index.js add http-server part 5.9 2025-04-09 16:12:34 +02:00
LICENSE add http-server part 5.9 2025-04-09 16:12:34 +02:00
package.json add http-server part 5.9 2025-04-09 16:12:34 +02:00
README.md add http-server part 5.9 2025-04-09 16:12:34 +02:00

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'