npm

Need private packages and team management tools?Check out npm Orgs. »

deep-freeze

0.0.1 • Public • Published

deep-freeze

recursively Object.freeze() objects

build status

example

var deepFreeze = require('deep-freeze');
 
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')

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.

Keywords

none

install

npm i deep-freeze

Downloadsweekly downloads

113,753

version

0.0.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability