setprototypeof (1.2.0)

Published 2026-02-24 14:05:00 +00:00 by atheaadmin

Installation

registry=
npm install setprototypeof@1.2.0
"setprototypeof": "1.2.0"

About this package

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'

Dependencies

Development Dependencies

ID Version
mocha ^6.1.4
standard ^13.0.2

Keywords

polyfill object setprototypeof
Details
npm
2026-02-24 14:05:00 +00:00
1
Wes Todd
ISC
latest
1.9 KiB
Assets (1)
Versions (2) View all
1.1.0 2026-02-24
1.2.0 2026-02-24