setprototypeof (1.1.0)

Published 2026-02-24 14:05:00 +00:00 by atheaadmin

Installation

registry=
npm install setprototypeof@1.1.0
"setprototypeof": "1.1.0"

About this package

Polyfill for Object.setPrototypeOf

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 = require('setprototypeof');

Keywords

polyfill object setprototypeof
Details
npm
2026-02-24 14:05:00 +00:00
0
Wes Todd
ISC
1.4 KiB
Assets (1)
Versions (2) View all
1.1.0 2026-02-24
1.2.0 2026-02-24