@extendscript/aes.patch.object.setprototypeof

2.0.0 • Public • Published

object.setprototypeof

ES5 Sham

The Object.setPrototypeOf() method sets the prototype (i.e., the internal Prototype property) of a specified object to another object or null.

Source: MDN

Warning: Changing the Prototype of an object is, by the nature of how modern JavaScript engines optimize property accesses, a very slow operation, in every browser and JavaScript engine. The effects on performance of altering inheritance are subtle and far-flung, and are not limited to simply the time spent in Object.setPrototypeOf(...) statement, but may extend to any code that has access to any object whose Prototype has been altered. If you care about performance you should avoid setting the Prototype of an object. Instead, create a new object with the desired Prototype using Object.create().

Install

npm install @extendscript/aes.patch.object.setprototypeof

Test

You can test the code against a range of targets:

npm run test target-1 target-2

We keep a log of test results

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i @extendscript/aes.patch.object.setprototypeof

    Weekly Downloads

    1

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    3.55 kB

    Total Files

    6

    Last publish

    Collaborators

    • extendscripter
    • fabian.moron.zirfas
    • fabianmoronzirfas
    • vogelino