学习?学个屁 06c63c15cc 初始化提交 11 bulan lalu
..
test 06c63c15cc 初始化提交 11 bulan lalu
LICENSE 06c63c15cc 初始化提交 11 bulan lalu
README.md 06c63c15cc 初始化提交 11 bulan lalu
index.d.ts 06c63c15cc 初始化提交 11 bulan lalu
index.js 06c63c15cc 初始化提交 11 bulan lalu
package.json 06c63c15cc 初始化提交 11 bulan lalu

README.md

Polyfill for Object.setPrototypeOf

NPM Version NPM Downloads js-standard-style

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'