deep-freeze 0.0.1

recursively Object.freeze() objects and functions

Platform: npm

Language: JavaScript

License: Unlicense

Keywords: freeze, deep, object, recursive

Repository: https://github.com/substack/deep-freeze

View on registry: https://www.npmjs.com/package/deep-freeze

Direct download link: https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz

Install: npm install [email protected]


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.

Releases

  • 0.0.1 - September 04, 2012 05:03
  • 0.0.0 - September 04, 2012 04:59

Project Statistics

SourceRank 18
Dependencies 0
Dependent projects 187
Dependent repositories 714
Total releases 2
Latest release
First release
Stars 606
Forks 24
Watchers 7
Contributors 1
Repo Size: 202 KB

Top Contributors See all

James Halliday

Something wrong with this page? Make a suggestion

Export .ABOUT file for this library

Last synced: 2017-02-15 00:42:20 UTC

Login to resync this project