deep-freeze-strict

WebJar for deep-freeze-strict

Лицензия

Лицензия

Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

deep-freeze-strict
Последняя версия

Последняя версия

1.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

deep-freeze-strict
WebJar for deep-freeze-strict
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/jsdf/deep-freeze

Скачать deep-freeze-strict

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/deep-freeze-strict/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>deep-freeze-strict</artifactId>
    <version>1.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/deep-freeze-strict/
implementation 'org.webjars.npm:deep-freeze-strict:1.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/deep-freeze-strict/
implementation ("org.webjars.npm:deep-freeze-strict:1.1.1")
'org.webjars.npm:deep-freeze-strict:jar:1.1.1'
<dependency org="org.webjars.npm" name="deep-freeze-strict" rev="1.1.1">
  <artifact name="deep-freeze-strict" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='deep-freeze-strict', version='1.1.1')
)
libraryDependencies += "org.webjars.npm" % "deep-freeze-strict" % "1.1.1"
[org.webjars.npm/deep-freeze-strict "1.1.1"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

deep-freeze-strict

recursively Object.freeze() objects.

this fork works in strict mode, so when freezing a function you don't get the error:

> (function(){ "use strict"; deepFreeze(function(){}); })();

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them

example

var deepFreeze = require('deep-freeze-strict');

deepFreeze(Buffer);
Buffer.x = 5;
console.log(Buffer.x === undefined);

Buffer.prototype.z = 3;
console.log(Buffer.prototype.z === undefined);

$ node example/deep.js
true
true

methods

var deepFreeze = require('deep-freeze-strict')

deepFreeze(obj)

Call Object.freeze(obj) recursively on all unfrozen properties of obj that are functions or objects.

license

public domain

Based in part on the code snippet from the MDN wiki page on Object.freeze(), which is released to the public domain.

Версии библиотеки

Версия
1.1.1