{"id":16594048,"url":"https://github.com/jsdf/deep-freeze","last_synced_at":"2025-04-06T05:17:59.562Z","repository":{"id":21176840,"uuid":"24481337","full_name":"jsdf/deep-freeze","owner":"jsdf","description":"recursively Object.freeze() on objects and functions","archived":false,"fork":false,"pushed_at":"2017-02-22T23:30:50.000Z","size":169,"stargazers_count":32,"open_issues_count":3,"forks_count":49,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T04:09:32.439Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"substack/deep-freeze","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsdf.png","metadata":{"files":{"readme":"readme.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-26T01:22:13.000Z","updated_at":"2024-08-20T04:42:49.000Z","dependencies_parsed_at":"2022-10-04T16:16:27.877Z","dependency_job_id":null,"html_url":"https://github.com/jsdf/deep-freeze","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdf%2Fdeep-freeze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdf%2Fdeep-freeze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdf%2Fdeep-freeze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdf%2Fdeep-freeze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsdf","download_url":"https://codeload.github.com/jsdf/deep-freeze/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247436366,"owners_count":20938548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T23:44:55.082Z","updated_at":"2025-04-06T05:17:59.524Z","avatar_url":"https://github.com/jsdf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deep-freeze-strict\n\nrecursively `Object.freeze()` objects.\n\nthis fork works in strict mode, so when \nfreezing a function you don't get the error:\n```\n\u003e (function(){ \"use strict\"; deepFreeze(function(){}); })();\n\nTypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them\n```\n\n# example\n\n``` js\nvar deepFreeze = require('deep-freeze-strict');\n\ndeepFreeze(Buffer);\nBuffer.x = 5;\nconsole.log(Buffer.x === undefined);\n\nBuffer.prototype.z = 3;\nconsole.log(Buffer.prototype.z === undefined);\n```\n\n***\n\n```\n$ node example/deep.js\ntrue\ntrue\n```\n\n# methods\n\n``` js\nvar deepFreeze = require('deep-freeze-strict')\n```\n\n## deepFreeze(obj)\n\nCall `Object.freeze(obj)` recursively on all unfrozen properties of `obj` that\nare functions or objects.\n\n# license\n\npublic domain\n\nBased in part on the code snippet from\n[the MDN wiki page on Object.freeze()](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/freeze),\nwhich\n[is released to the public domain](https://developer.mozilla.org/en-US/docs/Project:Copyrights).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdf%2Fdeep-freeze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsdf%2Fdeep-freeze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdf%2Fdeep-freeze/lists"}