tree: 3a021733849e190da182c2205829fa9a1c21565a [path history] [tgz]
  1. index.js
  2. LICENSE
  3. package.json
  4. README.md
node_modules/http-errors/node_modules/setprototypeof/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