![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 2 years ago | - | |
![]() | LICENSE | 2 years ago | 727 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | README.md | 2 years ago | 850 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | index.d.ts | 2 years ago | 93 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | index.js | 2 years ago | 384 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | package.json | 2 years ago | 1.9K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
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 = require('setprototypeof')