Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

setprototypeof

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

setprototypeof

A small polyfill for Object.setprototypeof

    1.2.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
45,444,620
decreased by-7.51%

Weekly downloads

Readme

Source

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'

Keywords

FAQs

Last updated on 18 Jul 2019

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc