JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 53643837
  • Score
    100M100P100Q236438F
  • License ISC

A small polyfill for Object.setprototypeof

Package Exports

  • setprototypeof

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (setprototypeof) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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