
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
deep-freeze-strict
Advanced tools
recursively Object.freeze() objects and functions, works in strict mode
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
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
var deepFreeze = require('deep-freeze-strict')
Call Object.freeze(obj)
recursively on all unfrozen properties of obj
that
are functions or objects.
public domain
Based in part on the code snippet from the MDN wiki page on Object.freeze(), which is released to the public domain.
FAQs
recursively Object.freeze() objects and functions, works in strict mode
The npm package deep-freeze-strict receives a total of 170,122 weekly downloads. As such, deep-freeze-strict popularity was classified as popular.
We found that deep-freeze-strict demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.