/ c4f / front / node_modules / setprototypeof /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]test/9 months ago -  
[   ]LICENSE9 months ago727  
[TXT]README.md9 months ago844  
[TXT]index.d.ts9 months ago 93  
[   ]index.js9 months ago407  
[   ]package.json9 months ago1.2K 
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'
Apache/2.4.38 (Debian) Server at www.karls.computer Port 80