{"name":"@agoric/make-hardener","version":"0.1.2","description":"Create a 'hardener' which freezes the API surface of a set of objects","keywords":["deepFreeze","harden","Object.freeze","freeze"],"author":{"name":"Agoric"},"license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/make-hardener#readme","repository":{"type":"git","url":"git+https://github.com/Agoric/SES-shim.git"},"bugs":{"url":"https://github.com/Agoric/SES-shim/issues"},"type":"module","parsers":{"js":"mjs"},"main":"./dist/make-hardener.cjs","module":"./src/main.js","browser":"./dist/make-hardener.umd.js","unpkg":"./dist/make-hardener.umd.js","types":"./types/main.d.ts","exports":{"./package.json":"./package.json",".":{"import":"./src/main.js","require":"./dist/make-hardener.cjs","browser":"./dist/make-hardener.umd.js"}},"scripts":{"build":"yarn build:types && yarn build:dist","build:dist":"rollup --config rollup.config.js","build:types":"tsc src/*.js --declaration --allowJs --emitDeclarationOnly --outDir types","clean":"rm -rf dist","cover":"nyc ava","lint":"eslint '**/*.js'","lint-fix":"eslint --fix '**/*.js'","lint:js":"eslint '**/*.js'","lint:types":"tsc --build jsconfig.json","prepublish":"yarn clean && yarn build","test":"ava"},"dependencies":{},"devDependencies":{"@agoric/eslint-config":"^0.1.0","@rollup/plugin-commonjs":"^13.0.0","@rollup/plugin-node-resolve":"^6.1.0","ava":"^3.12.1","babel-eslint":"^10.0.3","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^6.9.0","eslint-plugin-eslint-comments":"^3.1.2","eslint-plugin-import":"^2.19.1","eslint-plugin-prettier":"^3.1.2","nyc":"^15.1.0","prettier":"^1.19.1","rollup":"1.31.0","rollup-plugin-terser":"^5.1.3","typescript":"^4.0.5"},"publishConfig":{"access":"public"},"eslintConfig":{"extends":["@agoric"]},"prettier":{"trailingComma":"all","singleQuote":true},"ava":{"files":["test/**/test-*.js"],"timeout":"2m"},"directories":{"test":"test"},"_id":"@agoric/make-hardener@0.1.2","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-l5O7TCVDcl6NcWW5Rp/lAQaFLmje97wHrKPJbYV08M4TNDgSiMlesYtar40OnAR2pnzgsyilSQc+hU5mEvCJWg==","shasum":"b9a72d98ae23a4c6918cd7dc4a9a72deebafde45","tarball":"http://registry-npm.ywwl.com/@agoric/make-hardener/download/@agoric/make-hardener-0.1.2.tgz","fileCount":9,"unpackedSize":34710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCghkCRA9TVsSAnZWagAA4Y0P/2eQyKlrE2EopvSMIKDX\n0CdQc5QnWgPgrM2OoDsl6QWuwcHtzCcinSc/xipNAc23WEeEjPObtyY0pDmC\ndilK5cfPUPzYOx3lIyyvaP53jIZNSb28eGYfr2FVX0xvSzoS80/nkdlGZ9Zv\nR4cFTVzMg+2/4N9qS3jXB98kmAGlq9XKdJ5C9ba2vez2ReI3+8WayQNwn8UE\nk7TVSK9Mk9HErkzc+Zfe4Rcp740J79Z0fB+8raolEpGz0V8BiKxeDWod/1+8\ngSHiKM/WXcFlzz2x/2ufwMSgppyxlPJj7ov+lfSrMBXlV++nI4u56ZLu8rQb\n/JV7Woz797kVx7zsoIT1NGCNDqM4My65P9P/AyKUaaAJ5Pta3C3jbo7X3C8a\nDO0mjt8SbgPbFxcWeCmbqiEpVc8AdWzZdIxZ/HWcMu3D0hd9lwM4xH5tGiJP\nJ3D+3lwvh0KmzYNB5BNHyxGCuZdqUFC+fsDh3zBOadNszwHQdbwxtFRtiW9z\n7GwldN+92e8dxOh6GkUS7SVlbK893Xl4MDpcKhDdt9k9L+GZOUDMEqH4MPpz\ne8KwHKGkWQ0GalR5svMGd0WHzfIo7se12+VkMCnZMf27w2iLHNfvfJjTRsfI\nAHil07H+sRS2sEpOku0w5PUDmh/duxsVtGYq1OoxOne6xsITW25AfogiEKMB\ntlRN\r\n=L51e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID5i3Of36c3mh7g6Jnbq6zXhxG4GZ9XAKfw4+Rs0IQfEAiBWkZrVf+0lh/J1dgqej9koAZqRhWKlJLUYKvoB9FVeVg=="}],"size":8355,"noattachment":false,"key":"/@agoric/make-hardener/-/@agoric/make-hardener-0.1.2.tgz"},"_npmUser":{"name":"kriskowal","email":"kris.kowal@cixar.com"},"maintainers":[{"name":"warner","email":"warner-npm@lothar.com"},{"name":"erights","email":"erights@gmail.com"},{"name":"katesills","email":"kate@agoric.com"},{"name":"michaelfig","email":"michael@fig.org"},{"name":"kriskowal","email":"kris.kowal@cixar.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/make-hardener_0.1.2_1611270244096_0.5811068194662163"},"_hasShrinkwrap":false,"deprecated":"The `ses` package provides `harden` after `lockdown`. Do not use `@agoric/make-hardener` directly.","readme":"# MakeHardener\n\n[![Build Status][circleci-svg]][circleci-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n\nBuild a defensible API surface around an object by freezing all reachable properties.\n\n## How to use\n\n> Note: If you're writing an application, you probably don't want to use this package directly. You'll want to use the `harden()` function provided in [SES](https://github.com/Agoric/SES) to perform an all-encompassing \"deep freeze\" on your objects. Alternatively, if you want to test your code before using it in SES, you can import the [@agoric/harden package](https://github.com/Agoric/Harden). Note that without SES, `harden()` is insecure, and should be used for testing purposes only.\n\n## Why do we need to \"harden\" objects?\n\nPlease see the [harden()](https://github.com/Agoric/Harden) package for more documentation.\n\n## Creating a custom harden() Function\n\nThis package (`@agoric/make-hardener`) provides a `makeHardener()` which can be used to build your own `harden()` function. When you call `makeHardener()`, you give it an iterable of stopping points (the \"fringe\"), and the recursive property walk will stop its search when it runs into the fringe. The resulting `harden()` will throw an exception if anything it freezes has a prototype that is not already in the fringe, or was frozen during the same call (and thus added to the fringe).\n\n[circleci-svg]: https://circleci.com/gh/Agoric/make-hardener.svg?style=svg\n[circleci-url]: https://circleci.com/gh/Agoric/make-hardener\n[deps-svg]: https://david-dm.org/Agoric/make-hardener.svg\n[deps-url]: https://david-dm.org/Agoric/make-hardener\n[dev-deps-svg]: https://david-dm.org/Agoric/make-hardener/dev-status.svg\n[dev-deps-url]: https://david-dm.org/Agoric/make-hardener?type=dev\n[license-image]: https://img.shields.io/badge/License-Apache%202.0-blue.svg\n[license-url]: LICENSE\n","publish_time":1611270244234,"_cnpm_publish_time":1611270244234,"dist-tags":{"latest":"0.1.3"}}