htc 7ca38fdcbb 善行少年PC端首次提交(基础版) 1 week ago
..
test 7ca38fdcbb 善行少年PC端首次提交(基础版) 1 week ago
LICENSE 7ca38fdcbb 善行少年PC端首次提交(基础版) 1 week ago
README.md 7ca38fdcbb 善行少年PC端首次提交(基础版) 1 week ago
index.d.ts 7ca38fdcbb 善行少年PC端首次提交(基础版) 1 week ago
index.js 7ca38fdcbb 善行少年PC端首次提交(基础版) 1 week ago
package.json 7ca38fdcbb 善行少年PC端首次提交(基础版) 1 week ago

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'