pavlovm503 e8315ec972 modul | %!s(int64=4) %!d(string=hai) anos | |
---|---|---|
.. | ||
test | %!s(int64=4) %!d(string=hai) anos | |
LICENSE | %!s(int64=4) %!d(string=hai) anos | |
README.md | %!s(int64=4) %!d(string=hai) anos | |
index.d.ts | %!s(int64=4) %!d(string=hai) anos | |
index.js | %!s(int64=4) %!d(string=hai) anos | |
package.json | %!s(int64=4) %!d(string=hai) anos |
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')