![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 2 years ago | - | |
![]() | LICENSE | 2 years ago | 727 | f0d2fc9 test post-receive hook [كارل مبارك] |
![]() | README.md | 2 years ago | 844 | 15de0e0 styling, texts [كارل مبارك] |
![]() | index.d.ts | 2 years ago | 93 | |
![]() | index.js | 2 years ago | 407 | 15de0e0 styling, texts [كارل مبارك] |
![]() | package.json | 2 years ago | 1.2K | 120707f added node version q18.16 to dependincies [كارل مبارك] |
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.
$ 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'