All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.helpers.setProto.js Maven / Gradle / Ivy

There is a newer version: 1.22.3
Show newest version
'use strict';

var GetIntrinsic = require('get-intrinsic');

var originalSetProto = GetIntrinsic('%Object.setPrototypeOf%', true);

var hasProto = require('has-proto')();

module.exports = originalSetProto || (

	hasProto
		? function (O, proto) {
			O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign
			return O;
		}
		: null
);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy