🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

setprototypeof

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

setprototypeof

A small polyfill for Object.setprototypeof

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
91M
-5.28%
Maintainers
1
Weekly downloads
 
Created
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

polyfill

FAQs

Package last updated on 18 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts