1. setprototypeof
A small polyfill for Object.setprototypeof
setprototypeof
Package: setprototypeof
Created by: wesleytodd
Last modified: Sun, 26 Jun 2022 18:21:26 GMT
Version: 1.2.0
License: ISC
Downloads: 196,921,758
Repository: https://github.com/wesleytodd/setprototypeof

Install

npm install setprototypeof
yarn add setprototypeof

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'

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code