Opposite of Object.freeze or Object.seal in JavaScript

前端 未结 9 1363
无人共我
无人共我 2020-12-02 21:41

What is the opposite of Object.freeze or Object.seal? Is there a function that has a name such as detach?

9条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 22:41

    There is no way to do this, once an object has been frozen there is no way to unfreeze it.

    Source

    Freezing an object is the ultimate form of lock-down. Once an object has been frozen it cannot be unfrozen – nor can it be tampered in any manner. This is the best way to make sure that your objects will stay exactly as you left them, indefinitely

提交回复
热议问题