![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | a year ago | - | |
![]() | LICENSE | a year ago | 727 | |
![]() | README.md | a year ago | 844 | 595aea1 more query options + view options [كارل مبارك] |
![]() | index.d.ts | a year ago | 93 | |
![]() | index.js | a year ago | 407 | |
![]() | package.json | a year ago | 1.2K | afd0ccc remove unused [كارل مبارك] |
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'