setprototypeof
A small polyfill for Object.setprototypeof
Last updated 5 years ago by wesleytodd .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install setprototypeof 
SYNC missed versions from official npm registry.

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'

Current Tags

  • 1.2.0                                ...           latest (5 years ago)

7 Versions

  • 1.2.0                                ...           5 years ago
  • 1.1.1                                ...           6 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.3                                ...           8 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE