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
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
Assets (1)
Versions (2)
View all
setprototypeof-1.2.0.tgz
1.9 KiB