1.1.5 • Published 12 days ago

@teamteanpm2024/dolorem-eveniet-dolore v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
12 days ago

Object.setPrototypeOf Polyfill (@teamteanpm2024/dolorem-eveniet-dolore)

Example

require('@teamteanpm2024/dolorem-eveniet-dolore'); // Object.setPrototypeOf Polyfill
Object.setPrototypeOf(obj, proto);

Syntax

Object.setPrototypeOf(obj, prototype);

Parameters

  • obj - The object which is to have its prototype set.
  • prototype - The object's new prototype (an object or null).

Description

Throws a TypeError exception if the object whose [Prototype] is to be modified is non-extensible according to Object.isExtensible(). Does nothing if the prototype parameter isn't an object or null (i.e., number, string, boolean, or undefined). Otherwise, this method changes the [Prototype] of obj to the new value.

Object.setPrototypeOf() is in the latest ECMAScript 6 standard draft. It is generally considered the proper way to set the prototype of an object, vs. the more controversial Object.prototype.__proto__ property.

License

MIT

1.1.5

12 days ago

1.1.4

13 days ago

1.0.4

14 days ago

1.0.3

15 days ago

1.0.2

16 days ago

1.0.1

17 days ago

1.0.0

17 days ago