Limengbo 891268f387 前端项目搭建 5 éve
..
LICENSE 891268f387 前端项目搭建 5 éve
README.md 891268f387 前端项目搭建 5 éve
index.d.ts 891268f387 前端项目搭建 5 éve
index.js 891268f387 前端项目搭建 5 éve
package.json 891268f387 前端项目搭建 5 éve

README.md

Polyfill for 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.

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 = require('setprototypeof');