{"_id":"observable-membrane","_rev":"54-459016e253da3cc03a6cd1313b616cdd","name":"observable-membrane","dist-tags":{"latest":"2.0.0","next":"2.0.0"},"versions":{"0.25.0":{"name":"observable-membrane","version":"0.25.0","keywords":["proxy","membrane","observe","mutation"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@0.25.0","maintainers":[{"name":"diervo","email":"elfogris@gmail.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"dist":{"shasum":"d0f20e1c98c5425396fd021bc320eb96874508e2","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.25.0.tgz","fileCount":14,"integrity":"sha512-ySxObvl89y6EeHnjDNQDmcDZFs4EpVmtEimmf/joIgxwhfVLHONEkf8aSNgDLCjFY2n2cAnG9Ww1yldigq7wPQ==","signatures":[{"sig":"MEUCIBEJwwIfLHjTfjrq0rZkk8z43eLMneNe1tOOG6v1iTDfAiEAho0M5MroDFOUFEMypQeKk90+nbZbt5BqRFAPfrQ8kbo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":76668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT8SrCRA9TVsSAnZWagAA++0P/RzrMQ9Ui5A/53N5ppss\nFfLXQ+PjeSdy/jalbTHd1Z9C/ufFbe03n9WnlWPe5HqYrVQ1SQPr1q+PLdRa\nZtx7rlkBwix71CkkWPfas15swqGG3x36RaUg0yLbPCsutBxyYiIVVTs2h31a\n638s+WJg8QMznQwzNeAxRJ/plqTItx7bxQ+LQ9iW/KZ2ZheQrvzOruJORECh\nCCULOYq87zsfN6Z+TFejwTo6LBJAlSYT1wBDtB3t8KbwhuJjQ379o2nqyKeN\nKBizoRPdknyrJ7v65iyxCyeeDTxLipl4ut0m+Xs/0d2fl31haG9STFq4QBLz\nflvxylcF0F3SydUNX1ThP5Y0KGzm0bIYtC/jd9c5JCkslef0fMBOiTjbnU0N\nxixdpURb2NUZc+1+P1FDxbtMZyedE4HuUpn1nqnq/F+ySySNb6Xcki8N7uRn\nv2FGBU3zVLl/MsvkzDuNq6h1uNvT0pGcJDSuXg9l5U2EPkbko1COMpihkcNB\nJNw+flgp1aiXFaWHea25088aE9ak2I8X+pzuG2Slct3Tx24wl043Y0aDDvCd\n+7V/QPXjgvT0mkLfP0kwj5SkJPkVGelrl3lubEDoe7s+nvcMFXGiwYqBK860\ncpK1ahLBskrwuJ80kXIfwG40M/bNdRau3ftISdig/ZoTdHimdtuEjvKUZDnE\nGLTr\r\n=mujB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","files":["dist"],"module":"dist/modules/observable-membrane.js","gitHead":"81c623b3a357b7fd0ecb0d5477ced3cd43a171d9","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"diervo","email":"elfogris@gmail.com"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"6.1.0","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"_nodeVersion":"10.6.0","_hasShrinkwrap":false,"devDependencies":{"jest":"~23.1.0","rollup":"0.60.1","tslint":"~5.9.1","ts-jest":"~22.0.4","typescript":"2.7.2","@types/jest":"~23.0.0","@types/node":"8.9.4","babel-minify":"0.4.3","rollup-plugin-replace":"~2.0.0","rollup-plugin-typescript":"~0.8.1","conventional-changelog-cli":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.25.0_1531954347795_0.7627106417711593","host":"s3://npm-registry-packages"}},"0.24.0":{"name":"observable-membrane","version":"0.24.0","_id":"observable-membrane@0.24.0","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"dist":{"shasum":"9eb261848d44242411c960a4e6faba222c0b3470","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.24.0.tgz","fileCount":6,"integrity":"sha512-skxbvmFXBVqV8yGFhuh23gZX1dG0zQwkrfBR48Od46SxTzbz9TEQt6csl4p8LdcUm0OuQ2RVo29BX9/kcoiHqg==","signatures":[{"sig":"MEQCIDJRM+zJtSsPSxF1PLxqzdAb4ahWsUsz7QrQcti23JI0AiAPipnyk8cVNQwQER0oefPL1he3Vi/Ibh0mPzhmOqGcYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT/BYCRA9TVsSAnZWagAAoQoQAJRUGe61kkqhbw8wwaMj\nOrvcXD8sRAgG/hn6BkWM+0RMOnBaPMTEE/9SO/K2PJFQ8TbNvXbNos10HR6v\na3wFBYxBHmTdWPP7tyZV1xnUGQ80OKqCX23FP4N2pxpvB2fN6F4e3OxhK3yF\n+L7ZqO7+tvZNtCQfwDJKXOwBuRL6Dvj0SCKyaH6VxeCZqh1QOwOEU+Y3QaL9\ntrGFAWvoZvfrn5hbJtT81vn0PfeCBwuHOGJCSEMJTNwva8Rm4w1jAjQFVjoO\ntiDxepBAZsBprsx/T7iuH6psHEcwEsSbce5+4D5i7cQQW2N4ZTw59U5HQO8H\nop/sUO0YNLCNs6Fdw5M0HLV5Ea16wi9xvrp6ggEoHNL1k5Xl9Nb8TR/tjhrf\nGMjU8ALSfi377LGJTNzHptxYXBoFIybDk/ssRtod01/lSriHStovWj51bfQs\nchL711erZ0xurfnugmgVvg1VHSC6Nb4rj/25XhxA9dRSvRA8PdWdnwTTgRcq\n7POAemVujht1eZHC8LulSWjzFsdy31GV024jlmBc/b0MStFT1SV5ZHOc9Lhq\nYr9RQLHTGEYoc9sP9iUq2/Rsv+5KhqTgPETLyuz6dkVje4xGoS+WptSy3OUp\n0XaLtafVt0Y41oTM5kLNE5pzzYtO/xMJuqRKrtGZHtD903QXTDO3IssglJg8\n/stU\r\n=MXFi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","scripts":{"lint":"eslint src/**/*.ts","test":"DIR=`pwd` && cd ../../ && yarn test $DIR","build":"rollup -c","clean":"rm -rf dist","types":"tsc","watch":"rollup -c -w"},"_npmUser":{"name":"diervo","email":"elfogris@gmail.com"},"_npmVersion":"6.1.0","description":"Observable Membrane implementation for LWC","directories":{},"jsnext:main":"dist/modules/observable-membrane.js","_nodeVersion":"10.6.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"0.60.1","rollup-plugin-typescript":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.24.0_1531965527920_0.047811898769422934","host":"s3://npm-registry-packages"}},"0.24.1":{"name":"observable-membrane","version":"0.24.1","_id":"observable-membrane@0.24.1","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"dist":{"shasum":"d7a407db1f81dc9f325b32327af511533ce8a40d","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.24.1.tgz","fileCount":6,"integrity":"sha512-MEPjEvfhk3Hh0rl/lnHZl+TQT7UMioNss9VtBZGABghO6whaWCQo1iBYUh3EoRWFjuJksZOxaEWjlX6jI6coKg==","signatures":[{"sig":"MEUCIH78UiTc3f1kVELFLj59FbliwjQJjbzB64yu1MSZ31abAiEA7gJMmdl9Cz31uu+ZHn2uneYrYAZkGYXPQyYl07tE0kg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT/CECRA9TVsSAnZWagAAI3UP/06tuy6htz575icV06dY\nAYjMAV+P/kaPsvZy01Ndguh0O6MXhmUtkpSGqXUr4QnCehYsMw+TGya+2MYJ\nsYM9MI8zPO3evxOXKwBejhmUFx1WTqBiGCMRszFJPRbg4b7P6rheyNkAfPmr\njSGhpIrDiLLjA5/yR3Aau9YXJaU4dehiotW92g/DNhOhiJNbcxG08zUxrkbN\n1ZeiKWZTmiiBSMGoVFD9fw5/mK+JJlpngXt+QG/+WFDemrqRFOzV35BZhdUF\n42LyOXVJHBqsnwfER7recFwCosF08buSlmXcS6DRHuUOonn9WQFyRRcDI8Bp\n/gmLPsjnspwpuWLlAtEBeYFbpawFQ5lZqkV5Q+V9sZH4NPDhgw28df0Gp+vQ\nyND12vNneBz+A0wRej0CWmdaCGbqd3wjx1kQE+XiIKZZOM/Sf/9d6RQUd08o\nLMTGApmgUgvPowZZ6KYnPBuE3DLB8LerTTIyUT7dl9ZvjZd+zjr334uBJWos\n7kYVQdvpDK0M26w2TdK79Jlurg+KS/z9koqgj6TazJHq0jIreaXpzgP84Aqj\nAsWaPXLvKjMXmkAuVMskCUgpqo82EZoPpJves44izSEQCSIrn+tpGoEVWIeR\nbA6CqttFxihAD6ZJZRtXj/peWmO811efltADZmuAwwtDobPh/Z9EAuQ4w+yA\nzqfI\r\n=Y9ku\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","scripts":{"lint":"eslint src/**/*.ts","test":"DIR=`pwd` && cd ../../ && yarn test $DIR","build":"rollup -c","clean":"rm -rf dist","types":"tsc","watch":"rollup -c -w"},"_npmUser":{"name":"diervo","email":"elfogris@gmail.com"},"_npmVersion":"6.1.0","description":"Observable Membrane implementation for LWC","directories":{},"jsnext:main":"dist/modules/observable-membrane.js","_nodeVersion":"10.6.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"0.60.1","rollup-plugin-typescript":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.24.1_1531965572171_0.523236178223653","host":"s3://npm-registry-packages"}},"0.24.2":{"name":"observable-membrane","version":"0.24.2","_id":"observable-membrane@0.24.2","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"dist":{"shasum":"680af0bf8713a121647f4232a4bc50c478f886f3","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.24.2.tgz","fileCount":6,"integrity":"sha512-uWvgVJY4Qyu75WyV3LsxnRe4BzjNEkTYkO6Jpkm6mEOGc3G5N52Ofq7gDo7V3uVmpehYoZldeCnn/qlIt731hg==","signatures":[{"sig":"MEYCIQD56Y21A+emZ3ZBhaCL9bJ1/lN44f5FpjSlux95F1h+SAIhAIIKUIruZuIAp4o7C6rutGTiSenv2dBIpbkdT9oVjdGq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT/DdCRA9TVsSAnZWagAAGf0P/iFA42/ClKUxihiZKylE\nV+IJry1Zgqai4nzJM4fikn/LOLssUx/H9FzLKi9rgJ6DsMLTpORXHxZYh3Uc\nhz2DM2mRhZpDHWCXhvtsmPDX9j7rhHhJdhiWfPk4sjyhD9WeoXLEAuR433tr\ncAgKioZmSu7Knc4G5MeHjohTpSRX7PkvCwy7v90221EnVYYvzTVCzRBwM7g0\nVCgps6VxG1fwlgKbnYnbsCj5s7otAnYynuEukYDxkMigvjBhzPUDVELmuCBP\ntq21Z28oiHCAy/rJU+9BL62KqlW1Y+AZBJg2Gf+DIRtnrj/w6viN9iPVEZdK\nfK/2wWMXi6lUhp2H0ngCkMttxcHkfXvAy1IBUCCdfnRpJ96uH9SwDj3dEg5y\nV6wZsF4mT2riFyWF7642sn3CLSPGs+SFYHUjGv4e/90OSh4hhLsconBRYM4E\n6GyG2PKl+VAkKL6445LnoFbze+Mqoyl0G3y3yLypNswQ4EbD4x6QFrGHC0Up\nQMlukfzOF1tzUTtYZjTKfgkqzC1s3b6hdz5wiGtpKCXXehOcDE7P9jwsAiiW\nP5vkN11w3WsoH5TD9YeDrGS854YSxJskYq0AKCkoCWR2Ga2T1THFScGANvHC\n53vQyezlqBVhE+xcS7eRxBDSwa3u9vZoO6s/kT+abD/ewaLsLLk1oLETipnt\nN5ho\r\n=vfmN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","scripts":{"lint":"eslint src/**/*.ts","test":"DIR=`pwd` && cd ../../ && yarn test $DIR","build":"rollup -c","clean":"rm -rf dist","types":"tsc","watch":"rollup -c -w"},"_npmUser":{"name":"diervo","email":"elfogris@gmail.com"},"_npmVersion":"6.1.0","description":"Observable Membrane implementation for LWC","directories":{},"jsnext:main":"dist/modules/observable-membrane.js","_nodeVersion":"10.6.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"0.60.1","rollup-plugin-typescript":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.24.2_1531965661122_0.8820247824286362","host":"s3://npm-registry-packages"}},"0.24.0-beta.d48d78f8":{"name":"observable-membrane","version":"0.24.0-beta.d48d78f8","_id":"observable-membrane@0.24.0-beta.d48d78f8","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"dist":{"shasum":"33d71ae31f486ed4e3ae56863911347aa066f13b","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.24.0-beta.d48d78f8.tgz","fileCount":6,"integrity":"sha512-YmJB1s82SWAm+YZLGSmozID38TYq8XI/+IXyhKPLIJd2jjsCjxWWUVEBE4h12wr/eC+QvdGpGxHaEofvsLLNeg==","signatures":[{"sig":"MEUCIAWxID6CrCfebfRw629p+AIPtfycRVx1Q3fOOOMmZK+xAiEAwnbkHY7zeGOVPvA3/RjcGVIac1BHPVz9rYf0A+pMYBU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT/NsCRA9TVsSAnZWagAAOtgP/jwqqWXCLpCC57BOkIMp\nEHBkbeeKSSGRzUCB14UVXhUhMRUZrfbZnLl2RWn47B4c1uGFCmBjuBIzC24z\ni/V5SQLTxWzSliNE5RvSkDYH8Vvhunrzz4OWqzxH6xX5zQsaPEumNA0lxTET\nUFhbzWXQXk6O2YZe8KmWGvyrC4b0GM8vUX156xNYZyNZ5k2j630Mo3bmpLdo\n1RlKTzWbFgO9r2gqzon3y/5/Y3sPgzrRrvmD2yaMMZLyU1DYbcYm+5VWFcLD\nrrvvHrYrNJGCRae4flgV12Lfpdfgj1iXgOVmuiN8cqkezHoT/DywvXdHHuMI\nyqCRQBbzbmKIE/rzxyDEFviRErDyVqfpP5qIbe0fKq24Hu4tJUtVgD5JZcIi\nD+gJPyE2miLuHQ/LsHT6GKJS5BFCQI/1fkqt+vK/T3UP6FdbbxtRt7r0pNrT\nDggbcYxNc9mbaZDjx2W+M3FnH8yGRs/J/LcGU9RoxZde3vQWogKNpQpdWvIB\n+/kKKlNWVY2nnixpcvsEDRyTL7Of3+1SZvDOuemMSyOKOLq2fysXjfYPwmuw\nZtH93I5bZxaXrIXOThxCPcRS6CTOWgem7QO7xZqMhMBYcqAGLuUjQoQSMkcp\nPxWRkt9mwnPY22Rpv8mEckb1o1W8+pQc4icM59rjVBpRi30mQbbdBnSUTZPH\nEN2m\r\n=Uhd4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","scripts":{"lint":"eslint src/**/*.ts","test":"DIR=`pwd` && cd ../../ && yarn test $DIR","build":"rollup -c","clean":"rm -rf dist","types":"tsc","watch":"rollup -c -w"},"_npmUser":{"name":"diervo","email":"elfogris@gmail.com"},"_npmVersion":"6.1.0","description":"Observable Membrane implementation for LWC","directories":{},"jsnext:main":"dist/modules/observable-membrane.js","_nodeVersion":"10.6.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"0.60.1","rollup-plugin-typescript":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.24.0-beta.d48d78f8_1531966316117_0.38313788617341826","host":"s3://npm-registry-packages"}},"0.19.9":{"name":"observable-membrane","version":"0.19.9","_id":"observable-membrane@0.19.9","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"dist":{"shasum":"d29c637a57ec94f8c00359dc0662ebf095a2266f","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.19.9.tgz","fileCount":7,"integrity":"sha512-LSuTf9E41QUESTaUrPhEUVlHGQBaDz2+I7rTxqKIPAG0QD03CzT64fG5Nl3anLaij+DZzUCqSAjiVCUTIU3qPg==","signatures":[{"sig":"MEYCIQCfCIo5T17Z9HGaotFdoqR+3UYH5jqz3QDE9I+xNQM17AIhAMxYDry6OFs8KQxxAfdFAZGZf9j3wOZxudLXoqh1bEXT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":452331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbV62MCRA9TVsSAnZWagAAfSMP/1pFjzxXolMadjaqTZpj\nTc52EVri3c0PPdGrxkgr2HIpMvdPoef7Ncf1QmjjibzWrV7ejanK1fUVr6wP\nId4aPaqH9o8RAhHmgOxK93imH3uOfwUYyvkT9oGov6txrfZMAUYI6xZZB7K5\n3Ru8eV/lKT49+iJupAkZPnpfV5lZQolq9TOLv9tBmsGeSS8xlCEN/XggNgWz\nTpjBLKcBjMq5C7PMrhHxk+Af7NINM/pdskT2ChmohL8qUwUvhuFEta686RgV\nSxZQU1IBYlS9gnXb7EzfeNwXdKjAvMv4fTpqzvavm5pBBYFVnjqn26JXSAgG\nUzDdhGdrhDUPgQKRC0nTKJKHvtoKUJtVUGD3ry43E4ntckpGoj7SZPC06KpQ\nQ5vIB8S+grC70nQMjmIkT9KI+W+xYhXwWjH4D2iHxh1wKefLztNnb0LKtw4s\n+nqBpL/JGmjQnZvV0YLTF7oNipqh9wL4K/9iZBinG1rlYiZiGDJjEYsAHO0h\nVGBPMNnEoeus3c2vZnRlxiQqSpc8YnMtFGmujTFDQI1jX8cRJ1YxqQko9K9q\nqsvfLQrqfHsNoSyqg0lYkC9xzJ1vyGn/atv4x7SIy+Ks5Qlcvd8O+IxPn3Wx\ni3YG1mIOj764IPB0UQolQcj3Yaste4h7qhjeJAs1AOyrC0aS7HP3WWWMrgaW\ncVjF\r\n=ldIC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","scripts":{"lint":"eslint src/**/*.ts","test":"DIR=`pwd` && cd ../../ && yarn test $DIR","build":"rollup -c","clean":"rm -rf dist","types":"tsc","watch":"rollup -c -w"},"_npmUser":{"name":"diervo","email":"elfogris@gmail.com"},"_npmVersion":"5.6.0","description":"Observable Membrane implementation for LWC","directories":{},"jsnext:main":"dist/modules/observable-membrane.js","_nodeVersion":"8.11.3","_hasShrinkwrap":false,"devDependencies":{"rollup":"0.60.1","rollup-plugin-typescript":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.19.9_1532472716095_0.9960413742008378","host":"s3://npm-registry-packages"}},"0.24.12":{"name":"observable-membrane","version":"0.24.12","_id":"observable-membrane@0.24.12","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"dist":{"shasum":"d0cbae23fce496c3543820631a1349d88134ac50","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.24.12.tgz","fileCount":7,"integrity":"sha512-Qzoz6tJ2YQuQwxDVfisok0RG4vEdXNHzdF1O00xIi+6cjEgGwIcns0fa1T2sSJlcWF5keCzHZkym3Q1P1eFMBg==","signatures":[{"sig":"MEUCIQCV+yPkulpQDV3JGGzT64Ny+AfvDQyIQbbeLUzH5lFCLQIgSuMql6xxAhacIrHQ6Y+a+3ygapVWNFiPBXZbpFKbH+g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":452332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbWhzQCRA9TVsSAnZWagAAQ5MP/AthRDY4T6m7yzp3SGbE\ndzH/gFJHGbPeEhHU1VasRgXrc58BP0v9hss9By5U8Wi+MFnI7l/CLnCKdaJ+\n3Fhwt6l70GFvzfbbvnmmXoZ5QuZJfk0fRrRLBpbKZP66yhi2v43WBXR/NkI4\nqG+o1n59bblswLB/vsLHt8WD6aMgXyqBu7rc3EYq5vI6mcrza7eGfQtNtLWQ\nhK6kdtpp9PWk93rRaJKoOyt3pMoQYauPTyar7p65kI5ujj1gciOgw+NSixST\nDABfRtgCxt1IR/WmjmYRtT6QAQJRGjgovH5vvB0B444l+JoqZwEG5WGGVQqJ\nE12SSv5KpcWQmYd1tI41SFvLby1LCpgKTDqIIUCnzn1PN+p0CxKKRpE7xvdN\nirG3WbiNm/w4r5pviZatoSgFH8ovs16yHuvi2nd4WoFUauf87stf4amt24fV\nebZFzjeq2Ah/UVIvVUAwRT7J4Khd2rDZ6BgKlxeLGwEH1qVJEoQH4UMV+UmK\nke8/EvvnTuH3CVa1f6K6XuEj/YMZTl6tOl70BU2fJEuW/voRCe5fjMJjG5NH\n0VFdrfVlNP1k5drkEzb2NstFXFeDcDFy4sW9FY3jSekdWeWvnZ/69Bj7cr6E\noW9eQ85Ot5ELTOA8mcxCWs52JU1ZcDEoEZAosVQ6ARVPKh+7gozHOFNqvRYi\ndr/B\r\n=xafe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","scripts":{"lint":"eslint src/**/*.ts","test":"DIR=`pwd` && cd ../../ && yarn test $DIR","build":"rollup -c","clean":"rm -rf dist","types":"tsc","watch":"rollup -c -w"},"_npmUser":{"name":"diervo","email":"elfogris@gmail.com"},"_npmVersion":"5.6.0","description":"Observable Membrane implementation for LWC","directories":{},"jsnext:main":"dist/modules/observable-membrane.js","_nodeVersion":"8.11.3","_hasShrinkwrap":false,"devDependencies":{"rollup":"0.60.1","rollup-plugin-typescript":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.24.12_1532632271972_0.9339201318355164","host":"s3://npm-registry-packages"}},"0.24.14":{"name":"observable-membrane","version":"0.24.14","_id":"observable-membrane@0.24.14","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"dist":{"shasum":"35e8534ef4c6b9bf350cd5af4fa2898b23f417c7","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.24.14.tgz","fileCount":7,"integrity":"sha512-bDzT7psitkZtqZeq2D24+gVNuxxw7JLZuVrVwjfel9l+Xv3QHPPYiB7lTKHcOJ0Z+QS3V/oqFpfKYhlTkK7MUg==","signatures":[{"sig":"MEYCIQDIsDvSXLHlgnAPx4XjbjaFKOHwIJHEIG5/M14V40kAaQIhAKhhsyirtgRAsmucYdW6sq4k1EBd2Fd3ZemoZ+0WXNyN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":452332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYUqpCRA9TVsSAnZWagAAjcoP/3us9A8Y2fBPbkm1vAsQ\nR0Pzw7oT7nk25zxSyapDTJp8cWzXyP5+nPc1vdTBcY330apqy9RBce8H7hjG\nqL6RVFkw7lEsrkLXpqgWOOiMob7JG2Cvzcm709/YnItRtWI2a40uKnsdyXcb\nORpmU3JIFgeuXeyMuN1Nq/9n3nTQ3jVJaEWI2yBZDkmG0MTsweQnceGtq/83\nyFhe+8ReOif+Z2NOGeX9pujASMaGmj9MsedVxdlxAr8Anq6VjmyYZ6kppecA\n/nYKvG37QFE2XXo0/HjuUyC6S589BMAnDIO6+fWtU1gEweI/CqGuuMRFQziB\nyqa4dw7qsrpUM06V4TnnHbXLiOLYjRg28I8mMLrDkpyfpPPpjC0hfjrfEA8d\nTLJzORZRa83VXx+T6+B7tVNZojW4Ho2ILur+TySBxqxi8EpRP4Im+DIRUuxW\nwTW49Q906JpIxp3HbT+X4vnjcGD/K5NDTyH6mGXcozuj0XngcgnixHjWa5G/\naDHZ5zUjeK+kkJl4zWNa5/QFWn6ivAMgrdTXgWN6yYzQtC5Ki9CFs0rpEkIB\nIPfJKAEd+rCrCf+YTcyXOlWTixxOz3nJBt9Ry7Rn5OV0S6Eic0sBDDNrU6R4\nP642OyVfThGty9kuxzg1RH5QWzebY00wLbCjqAXyTpo0/jt8Bi7CDlDIDtwu\nA7rZ\r\n=1n6Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","scripts":{"lint":"eslint src/**/*.ts","test":"DIR=`pwd` && cd ../../ && yarn test $DIR","build":"rollup -c","clean":"rm -rf dist","types":"tsc","watch":"rollup -c -w"},"_npmUser":{"name":"diervo","email":"elfogris@gmail.com"},"_npmVersion":"5.6.0","description":"Observable Membrane implementation for LWC","directories":{},"jsnext:main":"dist/modules/observable-membrane.js","_nodeVersion":"8.11.3","_hasShrinkwrap":false,"devDependencies":{"rollup":"0.60.1","rollup-plugin-typescript":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.24.14_1533102761226_0.3897326319836294","host":"s3://npm-registry-packages"}},"0.18.0":{"name":"observable-membrane","version":"0.18.0","_id":"observable-membrane@0.18.0","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"dist":{"shasum":"95baaaa9dc16cc5ed1539c7f9c5ae28bd49f9099","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.18.0.tgz","fileCount":6,"integrity":"sha512-WESuqGINHWevozlPgu3Ekl8NHDPQuoL421yOJui6eh9hQyqVzVRyUwenysgsFOhQjeMe2WgG1C1+jfk1/Aik1Q==","signatures":[{"sig":"MEQCIGtdpsWqblMssfSEM/6h3EsnUrs7EhzSSlyB6llWfsEKAiBCF/j1F9LObhiUt37Q9ksGjq8ejTzDZU7DtFnqnR3rag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblN4jCRA9TVsSAnZWagAA8qYQAJV+u08/Q22sbr2PZMJ6\nsij5HSc8oKgrFC5P80aaxOed/v+ECSnxQ37LO0LFz0bWtz+FxCmKc+KXj3T+\n+mi/vlF2br1Fth8PVdpSm+2b4316sjgsLuo0BeizHj6S6O02yz8GZATLlZoj\njc6O4Eal+Wikt4FapRxy/1jx+a2zoNFZ7XiMWxhrWNM5XKpRElEYONh6RWjo\noDUJ1L3viJ47MpuXWUUKtSMM9sYoYWZhqAUDyJ6TB8BvzbnG4+YyfV1yFhT1\nM7TpHw+xajOgg/fmOiARLRlXOJwo4fDnDCviMC1yehR7FIuLEXAdPYh+OzwT\ntwFrxWcESNCC+L4xXfpGWJ/hIw9VwXq8fuLm+Cc3HRhae4R+cXV8FPNAyaGW\nY5Sezfi7QPBA0ZobYx+5wTH7J/MSygP5jXi7kx9XHAB6SXdN9UNztfhhPiLj\nzQ8xmo6nGVInbwsR1aFkv/sKtBax6AN7TZYe2dpNC3F7jcFQg9Jf3LzA+FlD\nKjKriZ4+FwNhiUdbF6jVmQM0tR4Ar4j8eJAGbfHSB5rkhBDnwJ10pNDNQlgt\ncjdAKenhzfxwontOa2pMXMiDBlWJq9kAHEvSuVxJW/PVBOuDoUX4AIXCURJg\nHavttumA1em3jQKq2ypDYhKpnCNx0ba4U/gp5/AukPMzhvQV9GDQ5B78nGiA\nvneF\r\n=Mfb3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","readme":"# Locker Service Membrane\n\nThis package implements a membrane for locker service integration. It supports distorting objects within an object graph for extra security and access checks.\n\n ### Usage\n\nThis package exposes one primitive:\n\n'''js\nimport { Membrane } from 'locker-membrane';\n\nfunction distortion (value) {\n    console.log('distorting');\n\n    if (value === 2) {\n        return 4;\n    }\n\n    return value;\n}\n\nconst plainObject = {\n    x: 2,\n    y: 1\n};\n\nconst membrane = new Membrane(distortion); // create new membrane\nconst seed = membrane.piercingHook(plainObject); // console output -> 'distorting'. Returns membrane proxy.\nseed.x // 4\nseed.y // 1\n```\n\n","scripts":{"lint":"eslint src/**/*.ts","test":"echo 'Testing observable membrane...' && DIR=`pwd` && cd ../../ && jest $DIR","build":"rollup -c","types":"tsc","watch":"rollup -c -w"},"_npmUser":{"name":"diervo","email":"elfogris@gmail.com"},"_npmVersion":"5.6.0","description":"Observable Membrane implementation for LWC","directories":{},"jsnext:main":"dist/modules/observable-membrane.js","_nodeVersion":"8.11.4","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rollup":"~0.56.2","rollup-plugin-typescript":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.18.0_1536482851232_0.5189812715924651","host":"s3://npm-registry-packages"}},"0.26.0":{"name":"observable-membrane","version":"0.26.0","keywords":["proxy","membrane","observe","mutation"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@0.26.0","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"dist":{"shasum":"f4f186660b4fbd61e91001424981b63e522f948e","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.26.0.tgz","fileCount":14,"integrity":"sha512-iVi2WY0l9sSuSDvXJpKd8FFx6vG2LGFa91Wd0c3gC4aRa7GhW8BByzIbqJwsOe1miQSJ02k8iFAyx2moGm7zmQ==","signatures":[{"sig":"MEQCIDxgMCv9u8FDAbYwrzVbZNXc4zLZdE05pz0Z6sbvFnzHAiBA5rQlUIWd1bAc+sBEGxVBB9DTTAmWGp9jtG/Zpc+gkg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8zkNCRA9TVsSAnZWagAAfAsQAJJYP7XOOW3sZN2qz/Hb\n7056nmj5/uZTeAaSI+mZc4/o1fp37WPYpWOfo0OI6VTcIawk9+EnaBS4J2wp\n8lndMwvshJjplHpFqAh5Dsg97ZW+UXJfV0e03rssO7H9LMiilR8AVyHQxaLL\nXOoiLZKeHXiB4bV+wbm/q1BqynEnQzncu+v3+628UcTndpycJAf7iuugTujM\nHF4KPK2fgC42fyz3ffhLgTTQrz7VVG48A0UA1t/SxZywIQPG71yJY+aR/3fF\n0buxNCJ2sQ+RqLOrLw7m1dTQc+0Svt/vOmsHA4BWIHqhnXR7hH1SFcBMTJVn\nXrd4kmu3Kpr493EKmtl0OV78kOcWsglAK/5NdxzWgnqu1rK61yzcuKvVPww8\nuRlIpIApis4JeA5KG8rbsrsyP2i3ygGJuGfvdpgOtV97fx95EFy9NgJDynNk\nMQ2Ogez3OHYH/rmcduyDgI3LO7sGL9N7Tvtprzbv+f3tczyKTbEUFOcxw+hR\nS4FIXf/URIKxtjCCOxKFoL7hoT5KeSH7vivfjx8teZul6pv5tqvvCgAGMAZS\n+P94PxVc5Jq6V3m13AwogqqL+GmlobDy3aliC40IgLsLNhs9LYIEoboDE8oI\nGY1fzPNEGct3+DiOAqW+GLfKsIx76aR26Pec23PpOEMsBxO2IMHoc8qiL6YI\n5n/6\r\n=ylUz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","gitHead":"7d515ee11b89ab9889b18195db1331efd02dce66","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"caridy","email":"caridy@gmail.com"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"5.6.0","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"_nodeVersion":"10.1.0","_hasShrinkwrap":false,"devDependencies":{"jest":"~23.1.0","rollup":"0.60.1","tslint":"~5.9.1","ts-jest":"~22.0.4","typescript":"2.7.2","@types/jest":"~23.0.0","@types/node":"8.9.4","babel-minify":"0.4.3","rollup-plugin-replace":"~2.0.0","rollup-plugin-typescript":"~0.8.1","conventional-changelog-cli":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.26.0_1542666508627_0.6715501263159471","host":"s3://npm-registry-packages"}},"0.26.1":{"name":"observable-membrane","version":"0.26.1","keywords":["proxy","membrane","observe","mutation"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@0.26.1","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dturissini@apple.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"dist":{"shasum":"5619a7b2f4b0414d62b3e6cc2ea65734a08cce7a","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.26.1.tgz","fileCount":14,"integrity":"sha512-fBxLHtd0pUFI/rKh6Dfn9fxjEgY4NkRIqlPEKa9fR28rC9CQDfQ5P+t292CtAArtXOQ1mF8Nq9m1cF52IdN8DA==","signatures":[{"sig":"MEUCIQCcBo8umakBBnBkhLDP/o2YCdnjuFrwUkc1a8gef/ESmQIgRggpFT6K1AjrfA7T4GgRFD2sieU1GBLPpPBC9isx+V8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":84642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciZqWCRA9TVsSAnZWagAAfm4P/R4MKn433UKan77dTm+U\nHXB3R9s/UwvnIarosw1EGGuvCi+5yqgLnpRKlljotusx8PCsW665vOorZr8w\nrbfe73tw8WXtIQP7Im0ikky+Of7tm2OtwfmSuAeZmRshH58qVeUOvIWZZOx0\nHwU4HH4LwdtCtoRYq8ZUiehq/rUwgW+ZrzkDNofz0zDbe2BhADz8FaJTb1Ss\n1TBmunMiEsUFsD5CppuNE7wH80dEW65rziFntDRRLK4r+LzKibogSB8ds4G0\ne/UyRywHE+W+TW0rLKmvSBUeAmDoeIFj5gifgl+V2xjUfNUEeVep/vY7G7yY\nTruf3DsWvJBurf4rML0WbSGS/oyEjkOYBoMh/FTu8LhdpyTWTAQafN9DE5vd\nyfE2xI0Aj0ao8ETu5jg2TvRnWyr7GVX+DFXObQhMoTD0E3FRB1CIwUAHKwXk\nF94QhYCYAeGfrmYc8qScGbJ+yTR72eN//kYhCK2+8zZpBtUPDjd/vZZm6H+y\nfnCsvafxr8vegcxSjD6QthpTdOfFlQAKD2LvtjwH+ncpUEGAufTJTeAiYY/C\nqXi9Me6v9Tccq6yRlDJjdEqIWi9VNPErA0xtAZhwx1q0SYi7l0ptmuHNquZH\n3CsycsFmkxhRgsNLahx8+hbFA+db9/mPNq0gPjIrvVstOAfSwNnCMXSwfrgX\nZQiN\r\n=N/4M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","gitHead":"35f3a93b097d5d5e7f9150a1ac7644ba65cdad57","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"6.4.1","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"_nodeVersion":"8.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"~23.1.0","rollup":"^1.4.1","tslint":"~5.9.1","ts-jest":"~22.0.4","typescript":"2.7.2","@types/jest":"~23.1.0","@types/node":"8.9.4","rollup-plugin-terser":"^4.0.4","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript":"~0.8.1","conventional-changelog-cli":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.26.1_1552521877476_0.3582644466935416","host":"s3://npm-registry-packages"}},"0.27.0-alpha1":{"name":"observable-membrane","version":"0.27.0-alpha1","keywords":["proxy","membrane","observe","mutation"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@0.27.0-alpha1","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"byao","email":"bobbyyao@gmail.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dave@turissini.co"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"jodarove","email":"jodarove@gmail.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"dist":{"shasum":"b2c6fc56c4434bbdeea5889bf81d27b7346341ee","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-0.27.0-alpha1.tgz","fileCount":14,"integrity":"sha512-LU4ykOVCK5c1HF0J3ccX9veM9lEK6BgPQ1HYfR3uA6MxHLSWvW/lPMlgq5O6VojqgqUfHMXGCyg7rZVxN0wsyA==","signatures":[{"sig":"MEUCIAb9DBgR8/QsDO4bNWkaM+B0wOH8612USvFnvf6ebY/NAiEA12PEQoTuecwtBhVg0GVsVOuho+oHfT7f/oR9O8NBRGI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0a+BCRA9TVsSAnZWagAAm9kP/Rl+eGLVOHgPiagOL0Oq\nJb3KRF1YCNecikgQKbokhvXyBb43qirvgP4ccdpIOBdgwFceseWxdE4jVCA/\nOnLGwes1f+fgHsobjYrOpbP2uEgZhNqOcPn9zEOf79lPEhD4E6x3OE4iSQ3J\n9InjnC3zd2GKkbWG/Or2tmRlNygE/LDl/vJvLqpZGPUG98IZgRZYPnEC0jqp\nO/orFIdjVsK2LMOe8nP2b4LPnYHtDDoioZNEXrINnqhriAtZIIzi6fm8rAq/\nYlMZesvqWQo02+KBsDxPuAGJnoQv5KMsGdxUaSOVc4P8CFcpIhP4rQk5KE1N\nKXO8ADdMdWhofh82XOhXEHIDz3C4BZpww1P9ymvu9m/8T7OPq0K0px3LzMyo\npQD4LtEG/L2X7qgor4dwKhvQlVhBM67gR3ZqqNFYwNMEGCS0Tnu255i/Tp/y\nsZ9eVTbQLEd9aeOMrNFh9nefod2WkOW8ebCsylqRiVRdBSyBz+nBVxmiKGaE\neSw8wsx3t1joyQmW3pjNsweUa5EAoroIrDeGviaVEwYSDdVoIf5O+ZlrM2TB\nmaffB34RjOX95E1v3uSjmQyXzABWrvvgjZkljjR5b6yH0r/vy+6f7uYpWynk\nZTFWJ9lRrIs/QYnhhHTlkeW0T6Zv9P/p2gp5wWeeSYEkpSLZ2o6ihf1B/P3j\nMfuo\r\n=9VTj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","readme":"# Observable Membrane\nCreating robust JavaScript code becomes increasingly important as web applications become more sophisticated. The dynamic nature of JavaScript code at runtime has always presented challenges for developers.\n\nThis package implements an observable membrane in JavaScript using Proxies.\n\nA membrane can be created to control access to a module graph, observe what the other part is attempting to do with the objects that were handed over to them, and even distort the way they see the module graph.\n\n## What is a Membrane\n\n* [Tom van Cutsem's original article, \"Isolating application sub-components with membranes\"](https://tvcutsem.github.io/membranes)\n* [Tom van Cutsem's original article, \"Membranes in JavaScript\"](https://tvcutsem.github.io/js-membranes)\n* [es-membrane library by Alexander J. Vincent](https://github.com/ajvincent/es-membrane)\n\n## Use Cases\n\nOne of the prime use-cases for observable membranes is the popular `@observed` or `@tracked` decorator used in components to detect mutations on the state of the component to re-render the component when needed. In this case, any object value set into a decorated field can be wrapped into an observable membrane to monitor if the object is accessed during the rendering phase, and if so, the component must be re-rendered when mutations on the object value are detected. And this process is applied not only at the object value level, but at any level in the object graph accessible via the observed object value.\n\nAdditionally, it supports distorting objects within an object graph, which could be used for:\n\n* Avoid leaking symbols and other non-observables objects.\n* Distorting values observed through the membrane.\n\n### Usage\n\nThe following example illustrates how to create an observable membrane, and proxies:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// yields 2\n\np.y.z;\n// yields 1\n```\n\n_Note: If the value that you're accessing via the membrane is an object that can be observed then the membrane will return a new proxy. In the example above, `o.y !== p.y` because it is a proxy that applies the exact same mechanism. In other words, the membrane is applicable to an entire object graph._\n\n#### Observing Access and Mutations\n\nThe most basic operation in an observable membrane is to observe property member access and mutations. For that, the constructor accepts an optional arguments `options` that accepts two callbacks, `valueObserved` and `valueMutated`:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n    valueMutated(target, key) {\n        // where target is the object that was mutated\n        // and key is the key that was mutated\n        console.log('mutated ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'accessed x'\n// yields 2\n\np.y.z;\n// console output -> 'accessed z'\n// yields 1\n\np.y.z = 3;\n// console output -> 'mutated z'\n// yields 3\n```\n\n#### Read Only Proxies\n\nAnother use-case for observable membranes is to prevent mutations in the object graph. For that, `ObservableMembrane` provides an additional method that gets a read-only version of any object value. One of the prime use-cases for read-only membranes is to hand over an object to another actor, observe how the actor uses that object reference, but prevent the actor from mutating the object. E.g.: passing an object property down to a child component that can consume the object value but not mutate it.\n\nThis is also a very cheap way of doing deep-freeze, although it is not exactly the same, but can cover a lot of ground without having to actually freeze the original object, or a copy of it:\n\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst r = membrane.getReadOnlyProxy(o);\n\nr.x;\n// yields 2\n\nr.y.z;\n// yields 1\n\nr.y.z = 2;\n// throws Error in dev-mode, and does nothing in production mode\n```\n\n#### Distortion\n\nAs described above, you can use distortions to avoid leaking non-observable objects and distorting values observed through the membrane:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueDistortion(value) {\n        if (value instanceof Node) {\n            throw new ReferenceError(`Invalid access to a non-observable Node`);\n        }\n        console.log('distorting ', value);\n        if (value === 1) {\n            return 10;\n        }\n        return value;\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n        node: document.createElement('p'),\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'distorting 2'\n// yields 2\n\np.y.z;\n// console output -> 'distorting 1'\n// yields 10\n\np.y.node;\n// throws ReferenceError\n```\n\n_Note: You could use a `WeakMap` to remap symbols to avoid leaking the original symbols and other non-observable objects through the distortion mechanism._\n\n#### Unwrapping Proxies\n\nFor advanced usages, the observable membrane instance offers the ability to unwrap any proxy generated by the membrane. This can be used to detect membrane presence and other detections that may be useful to framework authors. E.g.:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n    },\n};\n\nconst p = membrane.getProxy(o);\n\no.y !== p.x;\n// yields true because `p` is a proxy of `o`\n\no.y === membrane.unwrapProxy(p.y);\n// yields true because `membrane.unwrapProxy(p.y)` returns the original target `o.y`\n```\n\n## Example\n\nThere are [runnable examples](https://github.com/salesforce/observable-membrane/tree/master/examples) in this Git repository. You must build this package as described in the [Contributing Guide](CONTRIBUTING.md) before attempting to run the examples. Additionally, some of the examples might be relying on features that are not supported in all browsers (e.g.: [reactivo-element](https://github.com/salesforce/observable-membrane/tree/master/examples/reactivo-element) example relies on Web Components APIs).\n\n## API\n\n### `new ObservableMembrane([config])`\n\nCreate a new membrane.\n\n**Parameters**\n\n* `config` [Object] [Optional] The membrane configuration\n    * `valueObserved` [Function] [Optional] Callback invoked when an observed  property is accessed. This function receives as argument the original target and the property key.\n    * `valueMutated` [Function] [Optional] Callback invoked when an observed property is mutated. This function receives as argument the original target and the property key.\n    * `valueDistortion` [Function] [Optional] Callback to apply distortion to the objects present in the object graph. This function receives as argument a newly added object in the object graph.\n\n\n### `ObservableMembrane.prototype.getProxy(object)`\n\nWrap an object in the membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.getReadOnlyProxy(object)`\n\nWrap an object in the read-only membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.unwrapProxy(proxy)`\n\nUnwrap the proxified version of the object from the membrane and return it's original value.\n\n**Parameters**\n\n* `proxy` [Object] Proxified object to unwrap from the membrane.\n\n\n## Limitations and Other Features\n\n* This membrane implementation is tailored for observable objects, which are objects with the prototype chain set to `Object.prototype` or `null`. Any other object is not wrapped in a Proxy by design.\n* Distortion of Symbols and other built-in objects is possible via `valueDistortion` mechanism to avoid leaking internal.\n* The ability for the membrane creator to revoke all proxies within it to prevent further mutations to the underlying objects (aka, membrane shutdown switch) is not supported at the moment.\n* A value mutation that is set to a read-only proxy value is allowed, but the subtree will still be read-only, e.g.: `const p = membrane.getProxy({}); p.abc = membrane.getReadOnlyProxy({}); p.abc.qwe = 1;` will throw because the value assigned to `abc` is still read only.\n\n## Browser Compatibility\n\nObservable membranes requires Proxy (ECMAScript 6) [to be available](https://caniuse.com/#search=proxy).\n\n## Development State\n\nThis library is production ready, it has been used at Salesforce in production for over a year. It is very lightweight (~1k - minified and gzipped), that can be used with any framework or library. It is designed to be very performant.\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](CONTRIBUTING.md) before making a pull request.\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (C) 2017 salesforce.com, Inc.\n","gitHead":"7ce3e6ae44a7184e4702a692bb79b994991cb907","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"6.9.0","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"resolutions":{"**/optimist/minimist":"1.2.5"},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.5.0","tslib":"^1.11.1","rollup":"^2.7.3","tslint":"^6.1.2","ts-jest":"^25.4.0","typescript":"^3.8.3","@types/jest":"^25.2.1","@types/node":"^13.13.4","rollup-plugin-terser":"^5.3.0","@rollup/plugin-replace":"^2.3.2","@rollup/plugin-typescript":"^4.1.1","conventional-changelog-cli":"^2.0.31"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_0.27.0-alpha1_1590800257226_0.7160686814902193","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"observable-membrane","version":"1.0.0","keywords":["proxy","membrane","observe","mutation","track"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@1.0.0","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dave@turissini.co"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"jodarove","email":"jodarove@gmail.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"dist":{"shasum":"f468308bb733b58e87ff4d3958c642e045b123c2","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-1.0.0.tgz","fileCount":21,"integrity":"sha512-+oGaWNOGLR0xoOkYDB3B0AbXgFkyzaNCMgnxhA6EUu3G3gSpmhqDo18VMF2hehaLKlJmur1Iup/U0+OKKer6wg==","signatures":[{"sig":"MEYCIQCReh9lq6S2yQNV2GGvV7vCcu5/kyGT4moXM0meW7+FPAIhALCmDTu3BcCzkhEsB55X6E8Ely9mwUr7UO0KdOpcd7Xn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6Zb5CRA9TVsSAnZWagAAgCAP/25MDgoEkjC5p79nmFcg\nKRnA2n1liWu/Zm8WEuyp82luo8d/yWzur4Cm02pUbax0RX4sOokX7D4P3Wwj\n9ODnNtUvSwEmUhvIpaCs08veXvTYCPxvCI8AGxba4JYMTPqwBBCXDXlkq785\nZPDIMlzEt0Zzk9mRM7UTvemcFeD3EWcUFCW3SiuqbnBX5Om+dMP7BC6jz6P3\n0z+LDTywljqCAQMPDf0n5cZ3rdXzPafO+kWQnfxDiVtXHDnmzqDLoI8+Khl9\nF+JdkT/easQezHiDeBK0pvBS801mABjCpT5+2HaBD4ZZFEhV2kWKWox3ruiS\newzeBs7G5eFRRRpsJ7mb/01CFilZGiaQn+yRq44fZO55DoAWT/Qo5Vx2mDpl\nf6djvxGQNCMZ1vMUoyF+HvdkL9NbYgl4HRfzMgxphN0yfjON2KU+t5d5ch/H\ne8VYO6nJs12wpBmFWgtEwYGfjYMtEsqn482ByQpRPvv8Z6j3jghpwPswmUfw\nRmGLKS90G4gsKsJJ2eI6svSFBHjlN/awI2znlLDXbACWINXQnXkMcCaaezi+\nbdSJbhBa+I+FQh9XF9wNxbbHw+Bx8HPw5g1CLD3V38x6Kim2+SJw2St/DG6g\nTYJMqqiG4FV0aOuEVAjGIPI3mAu7jn8mxy6UPv8LUJ7Ga3semS/kSoqVMImG\nazPl\r\n=RFgC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"caridy","email":"caridy@gmail.com"},"repository":{"url":"git@github.com:salesforce/observable-membrane.git","type":"git"},"description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2017 Salesforce\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","resolutions":{"**/optimist/minimist":"1.2.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.5.0","tslib":"^1.11.1","rollup":"^2.7.3","tslint":"^6.1.2","ts-jest":"^25.4.0","typescript":"^3.8.3","@types/jest":"^25.2.1","@types/node":"^13.13.4","rollup-plugin-terser":"^5.3.0","@rollup/plugin-replace":"^2.3.2","@rollup/plugin-typescript":"^4.1.1","conventional-changelog-cli":"^2.0.31"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_1.0.0_1592366841079_0.42235994754760076","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"observable-membrane","version":"1.0.1","keywords":["proxy","membrane","observe","mutation","track"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@1.0.1","maintainers":[{"name":"apapko","email":"apapko@salesforce.com"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"dturissini","email":"dave@turissini.co"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"jodarove","email":"jodarove@gmail.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"tbliss","email":"tbliss@salesforce.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"dist":{"shasum":"1041074136d5d62b0fc488880bed1c3680674ec5","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-1.0.1.tgz","fileCount":21,"integrity":"sha512-AlPC0ZuEuBYt9LSbsBGOz0rpIjkdbIH5JQMLHZrmCRkUedfVoNSFQXLYso+hXxWrRqwEhxEkQuYNg6Pch3hmqQ==","signatures":[{"sig":"MEYCIQD/Dju7vCAA6VAtpKfhpEX6k38md3zmRedNBMi4/Q1VJwIhAKYxk9EnZpazlQAM3aoRJSkcKeIWODjmvMbIfJ4tN80X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe62oBCRA9TVsSAnZWagAAUOYQAInoOg4z+VYT2J6d1Acz\nkAZy/yo7t1kY/R+Uu1CLv0ZtZbTzmLP/QfQtVl9CY/fEhBsq/jOXXAwjplP4\ng4Sek9pdrJlvceAYu8VJw/BM3vGsdmXIzWqOsThSaT58jFlWnW9lzkosv9JA\nb6wdcrbib/4qC4c4PVgf4/EV1AuhysE5JM4bID7pjYyIVLot2lNjvk0A1wtr\n/5qN1wAq/QArT1QgHNeMnHVTyhiFY6iKAhEZv5mG2UgGAUTlewdGF8nCy9Y4\nSt+3LXAONLVS4FnJIhR1Eo3SW18YOQpqjGnDEGnN0Ws3JsKVrVDytFYP0G0x\ngVbnQi2AI2eEG4+VGEAv0MCwKAtYjL8TDRx/IuAoKMOOu1lk8C9fau87bpJZ\n0yvtbd0ClXrEePfzSAWyqSL1+x42rPCtcj7oMELSa3w8kET3RJiyTdPRyDFp\nnrHPjbG5aDH8itAobyB4hyuMsjgzoVb0AvI8Gn5pXxYtnwa2JYHz5fopKdWM\nwoP4u+PjPxeXOlKgjPyXP1UC7PnpdoHn6yo8WEoxasgLEuJQ/bSQCHhG+4oG\nk4fMna2FAIgAdnXHxGco9Aa1cmgMVqib9kpu5IdtTkVR8ai473x2v8N5zofl\njDmZdVgehbI/z9/dOBi9FplTO4cLpGX5i5y7pK+8Pg3VsiaadjuJEq3VTALv\nJnUl\r\n=HYj5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"caridy","email":"caridy@gmail.com"},"repository":{"url":"git@github.com:salesforce/observable-membrane.git","type":"git"},"description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2017 Salesforce\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","resolutions":{"**/optimist/minimist":"1.2.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.5.0","tslib":"^1.11.1","rollup":"^2.7.3","tslint":"^6.1.2","ts-jest":"^25.4.0","typescript":"^3.8.3","@types/jest":"^25.2.1","@types/node":"^13.13.4","rollup-plugin-terser":"^5.3.0","@rollup/plugin-replace":"^2.3.2","@rollup/plugin-typescript":"^4.1.1","conventional-changelog-cli":"^2.0.31"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_1.0.1_1592486401214_0.09793895345858172","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"observable-membrane","version":"1.1.2","keywords":["proxy","membrane","observe","mutation","track"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@1.1.2","maintainers":[{"name":"nolanlawson","email":"nolan@nolanlawson.com"},{"name":"abdulsattar","email":"asattar.md@gmail.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"jodarove","email":"jodarove@gmail.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"dist":{"shasum":"c051f9367e628177ef40b8770e1940eaba0d201d","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-1.1.2.tgz","fileCount":4,"integrity":"sha512-k4SLY26Hmx5v0RmhS3PsxGQvwwD2OC04qCMVytjWL7CEKTzT2nd3u07wJzjJEfJRmnOK+HBWbmWm71KpY9jmGg==","signatures":[{"sig":"MEQCIG5DRwh1zMKAWvkq2+EBfh1t4c2681y4t2wP7uwG9yRLAiBhLxveJfn6S6a2EHATCMBsXGHmU48Gw0GgaXRVZmAY9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15529,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb9oHCRA9TVsSAnZWagAAjvkQAJ8/Vc7KInuSrbJVOuZa\nrwTDmKUGuTDQeZkBWBj62S/R7qdF/NFA2mFYLZcVYzMbTnoVCgb60ECIp43F\nRiC+k6/kRiA0rq2Y86oiiLvTbWsI+0JeMG55llZe2IfjygoIptCu8YB63+TY\n7N/u8pGjqB7q/pV8BsXAafL66SZVHuE/c6mLoH7IfzS89hzLx+HmbLs32oG9\nhQCe9yaVYD38XoCurDuSes49g3ok4zs1zAwo3AuHVAFVMuo148XqDrOn5vuf\nmV//zZSiC65NpnG6Hcd+wQl7OMa1XvE484+gMO2dWmQHCSpAs/EWUkWEC64C\nBhELfhUNhTb3X5HcYUOq5w57NNvbO+0yUDOjgGuoP+6BxoItB/EESrNHIFqr\nCttqlA96iCWjQ+GBAepjtNW5Cq3bez9vBGwNRFcmCM0LVRJwSAIsjHvUZ6PC\nUP98zs8M/d8+7N/MdarPBgnGhWwGgV77Y6jqFY33d8g1oXDUMYIW5Pwc5oQJ\nnJ4C6QowrDlYAX7+kxhPdtf+QeXtVcXV3YHYrnk0enYXIbu+gATZ/kipLlfy\nxrxa+0ZVkt6d+C3MeMo1Rt520X+qYMW1/xWIkWW+W6PDc2t8s89QpsI5tRjt\n/gis3Dw01nYvhJELUaTFCN9WH4Zee++WEk036yUHp4XuwPi95WxcEiSYoh46\nLT4S\r\n=EFo6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","readme":"# Observable Membrane\n\nCreating robust JavaScript code becomes increasingly important as web applications become more sophisticated. The dynamic nature of JavaScript code at runtime has always presented challenges for developers.\n\nThis package implements an observable membrane in JavaScript using Proxies.\n\nA membrane can be created to observe access to a module graph, observe what the other part is attempting to do with certain objects, and even distort the way they see the module graph.\n\n## What is a Membrane\n\n* [Tom van Cutsem's original article, \"Isolating application sub-components with membranes\"](https://tvcutsem.github.io/membranes)\n* [Tom van Cutsem's original article, \"Membranes in JavaScript\"](https://tvcutsem.github.io/js-membranes)\n* [es-membrane library by Alexander J. Vincent](https://github.com/ajvincent/es-membrane)\n\n## Use Cases\n\nOne of the prime use-cases for observable membranes is the popular `@observed` or `@tracked` decorator used in components to detect mutations on the state of the component to re-render the component when needed. In this case, any object value set into a decorated field can be wrapped into an observable membrane to monitor if the object is accessed during the rendering phase, and if so, the component must be re-rendered when mutations on the object value are detected. And this process is applied not only at the object value level, but at any level in the object graph accessible via the observed object value.\n\nAdditionally, it supports distorting objects within an object graph, which could be used for:\n\n* Avoid leaking certain references.\n* Values observed through the membrane can be different representations of the original values.\n\n### Usage\n\nThe following example illustrates how to create an observable membrane, and proxies:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// yields 2\n\np.y.z;\n// yields 1\n```\n\n_Note: If the value that you're accessing via the membrane is an object that can be observed, then the membrane will return a proxy around it. In the example above, `o.y !== p.y` because it is a proxy that applies the exact same mechanism. In other words, the membrane is applicable to an entire object graph._\n\n#### Observing Access and Mutations\n\nThe most basic operation in an observable membrane is to observe property member access and mutations. For that, the constructor accepts an optional arguments `options` that accepts two callbacks, `valueObserved` and `valueMutated`:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n    valueMutated(target, key) {\n        // where target is the object that was mutated\n        // and key is the key that was mutated\n        console.log('mutated ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'accessed x'\n// yields 2\n\np.y.z;\n// console output -> 'accessed z'\n// yields 1\n\np.y.z = 3;\n// console output -> 'mutated z'\n// yields 3\n```\n\n#### Read Only Proxies\n\nAnother use-case for observable membranes is to prevent mutations in the object graph. For that, `ObservableMembrane` provides an additional method that gets a read-only version of any object value. One of the prime use-cases for read-only membranes is to hand over an object to another actor, observe how the actor uses that object reference, but prevent the actor from mutating the object. E.g.: passing an object property down to a child component that can consume the object value but not mutate it.\n\nThis is also a very cheap way of doing deep-freeze, although it is not exactly the same, but can cover a lot of ground without having to actually freeze the original object, or a copy of it:\n\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst r = membrane.getReadOnlyProxy(o);\n\nr.x;\n// yields 2\n\nr.y.z;\n// yields 1\n\nr.y.z = 2;\n// throws Error in dev-mode, and does nothing in production mode\n```\n\n#### Distortion\n\nAs described above, you can use distortions to avoid leaking non-observable objects and distorting values observed through the membrane:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueDistortion(value) {\n        if (value instanceof Node) {\n            throw new ReferenceError(`Invalid access to a non-observable Node`);\n        }\n        console.log('distorting ', value);\n        if (value === 1) {\n            return 10;\n        }\n        return value;\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n        node: document.createElement('p'),\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'distorting 2'\n// yields 2\n\np.y.z;\n// console output -> 'distorting 1'\n// yields 10\n\np.y.node;\n// throws ReferenceError\n```\n\n_Note: You could use a `WeakMap` to remap symbols to avoid leaking the original symbols and other non-observable objects through the distortion mechanism._\n\n#### Unwrapping Proxies\n\nFor advanced usages, the observable membrane instance offers the ability to unwrap any proxy generated by the membrane. This can be used to detect membrane presence and other detections that may be useful to framework authors. E.g.:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n    },\n};\n\nconst p = membrane.getProxy(o);\n\no.y !== p.x;\n// yields true because `p` is a proxy of `o`\n\no.y === membrane.unwrapProxy(p.y);\n// yields true because `membrane.unwrapProxy(p.y)` returns the original target `o.y`\n```\n\n### Observable Objects\n\nThis membrane implementation is tailored for what we call \"observable objects\", which are objects with basic functionalities that do not require identity to be preserved. Usually any object with the prototype chain set to `Object.prototype` or `null`. You can control what gets wrapped by implementing a custom callback for the `valueIsObservable` option:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueIsObservable(value) {\n        // intentionally checking for null\n        if (value === null) {\n            return false;\n        }\n\n        // treat all non-object types, including undefined, as non-observable values\n        if (typeof value !== 'object') {\n            return false;\n        }\n\n        if (isArray(value)) {\n            return true;\n        }\n\n        const proto = Reflect.getPrototypeOf(value);\n        return (proto === Object.prototype || proto === null);\n    },\n});\n\nconst o = {\n    x: 1\n};\nmembrane.getProxy(o) !== o; // yields true because it was wrapped\n\nmembrane.getProxy(document) !== document; // yields false because a DOM object is not observable\n```\n\nNote: be very careful about customizing `valueIsObservable`. Any object with methods that requires identity (e.g.: objects with private fields, or methods accessing weakmaps with the `this` value as a key), will simply not work because those methods will be called with the `this` value being the actual proxy.\n\n## Example\n\nThere are [runnable examples](https://github.com/salesforce/observable-membrane/tree/master/examples) in this Git repository. You must build this package as described in the [Contributing Guide](CONTRIBUTING.md) before attempting to run the examples. Additionally, some of the examples might be relying on features that are not supported in all browsers (e.g.: [reactivo-element](https://github.com/salesforce/observable-membrane/tree/master/examples/reactivo-element) example relies on Web Components APIs).\n\n## API\n\n### `new ObservableMembrane([config])`\n\nCreate a new membrane.\n\n**Parameters**\n\n* `config` [Object] [Optional] The membrane configuration\n    * `valueObserved` [Function] [Optional] Callback invoked when an observed  property is accessed. This function receives as argument the original target and the property key.\n    * `valueMutated` [Function] [Optional] Callback invoked when an observed property is mutated. This function receives as argument the original target and the property key.\n    * `valueDistortion` [Function] [Optional] Callback to apply distortion to the objects present in the object graph. This function receives as argument a newly added object in the object graph.\n    * `valueIsObservable` [Function] [Optional] Callback to determine whether or not a value qualifies as a proxy target for the membrane. The default implementation will only observe plain objects (objects with their prototype set to `null` or `Object.prototype`).\n    * `tagPropertyKey` [PropertyKey] [Optional] A valid string or symbol that can be used to identify proxies created by the membrane. This is useful for any kind of debugging tools or object identity mechanism.\n\n\n### `ObservableMembrane.prototype.getProxy(object)`\n\nWrap an object in the membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.getReadOnlyProxy(object)`\n\nWrap an object in the read-only membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.unwrapProxy(proxy)`\n\nUnwrap the proxified version of the object from the membrane and return it's original value.\n\n**Parameters**\n\n* `proxy` [Object] Proxified object to unwrap from the membrane.\n\n\n## Limitations and Other Features\n\n* Not all objects can be wrapped by this membrane. More information about this in the examples above.\n* Distortion of Symbols and other built-in objects is possible via `valueDistortion` mechanism to avoid leaking internal.\n* The ability for the membrane creator to revoke all proxies within it to prevent further mutations to the underlying objects (aka, membrane shutdown switch) is not supported at the moment.\n* A value mutation that is set to a read-only proxy value is allowed, but the subtree will still be read-only, e.g.: `const p = membrane.getProxy({}); p.abc = membrane.getReadOnlyProxy({}); p.abc.qwe = 1;` will throw because the value assigned to `abc` is still read only.\n\n## Browser Compatibility\n\nObservable membranes requires Proxy (ECMAScript 6) [to be available](https://caniuse.com/#search=proxy).\n\n## Development State\n\nThis library is production ready, it has been used at Salesforce in production for over a year. It is very lightweight (~1k - minified and gzipped), that can be used with any framework or library. It is designed to be very performant.\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](CONTRIBUTING.md) before making a pull request.\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (C) 2017 salesforce.com, Inc.\n","gitHead":"5e64a21f4b18a0835515b326fd5aa1ef0cac9baf","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","release:version":"./scripts/release/version.js","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","release:publish:ci":"./scripts/release/publish.js"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"ekashida","email":"ekashida@gmail.com"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"6.14.11","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"resolutions":{"**/optimist/minimist":"1.2.5"},"_nodeVersion":"14.15.5","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","execa":"^5.0.0","is-ci":"^3.0.0","tslib":"^2.1.0","rollup":"^2.40.0","semver":"^7.3.5","tslint":"^6.1.3","ts-jest":"^26.5.3","typescript":"^4.2.3","@types/jest":"^26.0.20","@types/node":"^14.14.32","rollup-plugin-terser":"^7.0.2","@rollup/plugin-replace":"^2.4.1","@rollup/plugin-typescript":"^8.2.0","conventional-changelog-cli":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_1.1.2_1617943047397_0.006652689512741006","host":"s3://npm-registry-packages"}},"1.1.3-alpha.0":{"name":"observable-membrane","version":"1.1.3-alpha.0","keywords":["proxy","membrane","observe","mutation","track"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@1.1.3-alpha.0","maintainers":[{"name":"nolanlawson","email":"nolan@nolanlawson.com"},{"name":"abdulsattar","email":"asattar.md@gmail.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"jodarove","email":"jodarove@gmail.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"dist":{"shasum":"76e2cf65cd806fbddeddae8ea2fb81ecdf019b8d","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-1.1.3-alpha.0.tgz","fileCount":4,"integrity":"sha512-oluSLpqVZmQHY63g0uylmcraDaiizBBHLf35QuSNBlndMRbXQ8R8bOPgXrrbhx81bhdrYCY9X6e8Qqa+Y7q4Yw==","signatures":[{"sig":"MEUCIQD3yxhctJVKU8lJr3khI15AhKHM/4jrulx00lj9gkGMGQIgWmmK+NaS2GmJC08oNdnEihS7IIlyhHgWxHfp5u0sk5k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc9hLCRA9TVsSAnZWagAArIQP/R9h4UFd4Inbzd4f0dqn\n4CitbRhUXBaXxhHUCk52oZ+e/2lniYIfHIKwjX1qpflZOhCcLKaFytToP9k0\nLH1UQJYW+DlGHaNxHpGv5Sb29PIrw6aNeDfOo/blq8oi/3qPmP8p4HCHTSFp\nYpwwW/wgFmxNzthxmmA3PxKmCEKsX7O6DeGWKR7tX6XVbPwhNmGtEO4rKSpy\nW0DWRlDmVrQBJbyl9NSXMXEiRonG5KMKU8DZpy33digczR9GdwkIG0xiiYw9\nWPQ2EL1ElVoCm2AHiAiLKA2ApPZ2/cZOMP3bfP9NxITMwbIkZQguu6JYTbP2\ne2xoTs48u4/7TKhGGH0i2Ye3VvWHvZsrBInVrwJ0Eg/3k9j5pGAfPIiPv6ea\n2G/AppXFHLUnT5xB4tP9xhhhYil6UbcwrG6LV39Ac4YjV2relYDLOjQcnRfj\nuGBZzccyTjEaXpppa9xoxGOq6Ug2IIuDfkghXiLAJApADBznESt7wdmc0U0b\nxKl8AXmDU1ZwkInvZge7/9AeOt9qkNX1VR5sqQ+cWRqI4B3K+yz2N0Wo1UNZ\nxg/Vvz6Cf4Hpt77LITk4VoBUPxyr+w0TRta2/12XCuybj2fugW/+8dSE2qCZ\nU/senh3msZB3QzH3u3wxdJ2cn9VQAIp3C9Mjl4aIzwUXpFH46BTJzHX48DRI\nQopY\r\n=Gvmu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","readme":"# Observable Membrane\n\nCreating robust JavaScript code becomes increasingly important as web applications become more sophisticated. The dynamic nature of JavaScript code at runtime has always presented challenges for developers.\n\nThis package implements an observable membrane in JavaScript using Proxies.\n\nA membrane can be created to observe access to a module graph, observe what the other part is attempting to do with certain objects, and even distort the way they see the module graph.\n\n## What is a Membrane\n\n* [Tom van Cutsem's original article, \"Isolating application sub-components with membranes\"](https://tvcutsem.github.io/membranes)\n* [Tom van Cutsem's original article, \"Membranes in JavaScript\"](https://tvcutsem.github.io/js-membranes)\n* [es-membrane library by Alexander J. Vincent](https://github.com/ajvincent/es-membrane)\n\n## Use Cases\n\nOne of the prime use-cases for observable membranes is the popular `@observed` or `@tracked` decorator used in components to detect mutations on the state of the component to re-render the component when needed. In this case, any object value set into a decorated field can be wrapped into an observable membrane to monitor if the object is accessed during the rendering phase, and if so, the component must be re-rendered when mutations on the object value are detected. And this process is applied not only at the object value level, but at any level in the object graph accessible via the observed object value.\n\nAdditionally, it supports distorting objects within an object graph, which could be used for:\n\n* Avoid leaking certain references.\n* Values observed through the membrane can be different representations of the original values.\n\n### Usage\n\nThe following example illustrates how to create an observable membrane, and proxies:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// yields 2\n\np.y.z;\n// yields 1\n```\n\n_Note: If the value that you're accessing via the membrane is an object that can be observed, then the membrane will return a proxy around it. In the example above, `o.y !== p.y` because it is a proxy that applies the exact same mechanism. In other words, the membrane is applicable to an entire object graph._\n\n#### Observing Access and Mutations\n\nThe most basic operation in an observable membrane is to observe property member access and mutations. For that, the constructor accepts an optional arguments `options` that accepts two callbacks, `valueObserved` and `valueMutated`:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n    valueMutated(target, key) {\n        // where target is the object that was mutated\n        // and key is the key that was mutated\n        console.log('mutated ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'accessed x'\n// yields 2\n\np.y.z;\n// console output -> 'accessed z'\n// yields 1\n\np.y.z = 3;\n// console output -> 'mutated z'\n// yields 3\n```\n\n#### Read Only Proxies\n\nAnother use-case for observable membranes is to prevent mutations in the object graph. For that, `ObservableMembrane` provides an additional method that gets a read-only version of any object value. One of the prime use-cases for read-only membranes is to hand over an object to another actor, observe how the actor uses that object reference, but prevent the actor from mutating the object. E.g.: passing an object property down to a child component that can consume the object value but not mutate it.\n\nThis is also a very cheap way of doing deep-freeze, although it is not exactly the same, but can cover a lot of ground without having to actually freeze the original object, or a copy of it:\n\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst r = membrane.getReadOnlyProxy(o);\n\nr.x;\n// yields 2\n\nr.y.z;\n// yields 1\n\nr.y.z = 2;\n// throws Error in dev-mode, and does nothing in production mode\n```\n\n#### Distortion\n\nAs described above, you can use distortions to avoid leaking non-observable objects and distorting values observed through the membrane:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueDistortion(value) {\n        if (value instanceof Node) {\n            throw new ReferenceError(`Invalid access to a non-observable Node`);\n        }\n        console.log('distorting ', value);\n        if (value === 1) {\n            return 10;\n        }\n        return value;\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n        node: document.createElement('p'),\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'distorting 2'\n// yields 2\n\np.y.z;\n// console output -> 'distorting 1'\n// yields 10\n\np.y.node;\n// throws ReferenceError\n```\n\n_Note: You could use a `WeakMap` to remap symbols to avoid leaking the original symbols and other non-observable objects through the distortion mechanism._\n\n#### Unwrapping Proxies\n\nFor advanced usages, the observable membrane instance offers the ability to unwrap any proxy generated by the membrane. This can be used to detect membrane presence and other detections that may be useful to framework authors. E.g.:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n    },\n};\n\nconst p = membrane.getProxy(o);\n\no.y !== p.x;\n// yields true because `p` is a proxy of `o`\n\no.y === membrane.unwrapProxy(p.y);\n// yields true because `membrane.unwrapProxy(p.y)` returns the original target `o.y`\n```\n\n### Observable Objects\n\nThis membrane implementation is tailored for what we call \"observable objects\", which are objects with basic functionalities that do not require identity to be preserved. Usually any object with the prototype chain set to `Object.prototype` or `null`. You can control what gets wrapped by implementing a custom callback for the `valueIsObservable` option:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueIsObservable(value) {\n        // intentionally checking for null\n        if (value === null) {\n            return false;\n        }\n\n        // treat all non-object types, including undefined, as non-observable values\n        if (typeof value !== 'object') {\n            return false;\n        }\n\n        if (isArray(value)) {\n            return true;\n        }\n\n        const proto = Reflect.getPrototypeOf(value);\n        return (proto === Object.prototype || proto === null);\n    },\n});\n\nconst o = {\n    x: 1\n};\nmembrane.getProxy(o) !== o; // yields true because it was wrapped\n\nmembrane.getProxy(document) !== document; // yields false because a DOM object is not observable\n```\n\nNote: be very careful about customizing `valueIsObservable`. Any object with methods that requires identity (e.g.: objects with private fields, or methods accessing weakmaps with the `this` value as a key), will simply not work because those methods will be called with the `this` value being the actual proxy.\n\n## Example\n\nThere are [runnable examples](https://github.com/salesforce/observable-membrane/tree/master/examples) in this Git repository. You must build this package as described in the [Contributing Guide](CONTRIBUTING.md) before attempting to run the examples. Additionally, some of the examples might be relying on features that are not supported in all browsers (e.g.: [reactivo-element](https://github.com/salesforce/observable-membrane/tree/master/examples/reactivo-element) example relies on Web Components APIs).\n\n## API\n\n### `new ObservableMembrane([config])`\n\nCreate a new membrane.\n\n**Parameters**\n\n* `config` [Object] [Optional] The membrane configuration\n    * `valueObserved` [Function] [Optional] Callback invoked when an observed  property is accessed. This function receives as argument the original target and the property key.\n    * `valueMutated` [Function] [Optional] Callback invoked when an observed property is mutated. This function receives as argument the original target and the property key.\n    * `valueDistortion` [Function] [Optional] Callback to apply distortion to the objects present in the object graph. This function receives as argument a newly added object in the object graph.\n    * `valueIsObservable` [Function] [Optional] Callback to determine whether or not a value qualifies as a proxy target for the membrane. The default implementation will only observe plain objects (objects with their prototype set to `null` or `Object.prototype`).\n    * `tagPropertyKey` [PropertyKey] [Optional] A valid string or symbol that can be used to identify proxies created by the membrane. This is useful for any kind of debugging tools or object identity mechanism.\n\n\n### `ObservableMembrane.prototype.getProxy(object)`\n\nWrap an object in the membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.getReadOnlyProxy(object)`\n\nWrap an object in the read-only membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.unwrapProxy(proxy)`\n\nUnwrap the proxified version of the object from the membrane and return it's original value.\n\n**Parameters**\n\n* `proxy` [Object] Proxified object to unwrap from the membrane.\n\n\n## Limitations and Other Features\n\n* Not all objects can be wrapped by this membrane. More information about this in the examples above.\n* Distortion of Symbols and other built-in objects is possible via `valueDistortion` mechanism to avoid leaking internal.\n* The ability for the membrane creator to revoke all proxies within it to prevent further mutations to the underlying objects (aka, membrane shutdown switch) is not supported at the moment.\n* A value mutation that is set to a read-only proxy value is allowed, but the subtree will still be read-only, e.g.: `const p = membrane.getProxy({}); p.abc = membrane.getReadOnlyProxy({}); p.abc.qwe = 1;` will throw because the value assigned to `abc` is still read only.\n\n## Browser Compatibility\n\nObservable membranes requires Proxy (ECMAScript 6) [to be available](https://caniuse.com/#search=proxy).\n\n## Development State\n\nThis library is production ready, it has been used at Salesforce in production for over a year. It is very lightweight (~1k - minified and gzipped), that can be used with any framework or library. It is designed to be very performant.\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](CONTRIBUTING.md) before making a pull request.\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (C) 2017 salesforce.com, Inc.\n","gitHead":"9b8037d97e520086b7081090115de7bd0247885f","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","release:version":"./scripts/release/version.js","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","release:publish:ci":"./scripts/release/publish.js"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"lwc-admin","email":"admin@lwcjs.org"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"6.14.11","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"resolutions":{"**/optimist/minimist":"1.2.5"},"_nodeVersion":"14.15.5","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","execa":"^5.0.0","is-ci":"^3.0.0","tslib":"^2.1.0","rollup":"^2.40.0","semver":"^7.3.5","tslint":"^6.1.3","ts-jest":"^26.5.3","typescript":"^4.2.3","@types/jest":"^26.0.20","@types/node":"^14.14.32","rollup-plugin-terser":"^7.0.2","@rollup/plugin-replace":"^2.4.1","@rollup/plugin-typescript":"^8.2.0","conventional-changelog-cli":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_1.1.3-alpha.0_1618204746793_0.6739048050519811","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"observable-membrane","version":"1.1.3","keywords":["proxy","membrane","observe","mutation","track"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@1.1.3","maintainers":[{"name":"jye-sf","email":"jye@salesforce.com"},{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"jodarove","email":"jodarove@gmail.com"},{"name":"abdulsattar","email":"asattar.md@gmail.com"},{"name":"nolanlawson","email":"nolan@nolanlawson.com"},{"name":"jmsjtu","email":"jmsjtu@gmail.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"//":"Currently can't upgrade TypeScript to v4.4.2 because it breaks Rollup: https://git.io/JuCcs","dist":{"shasum":"ad4441f8bae5d5b7f4b2035fa1f9dad2d514fb6c","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-1.1.3.tgz","fileCount":14,"integrity":"sha512-UoMUGgGe7oLHCa0JZRPgrzQDkdOg+CxATra0m2uRNxhUapozafgv1qmssVsXnIkkuO2Q7UBycS0PBR2vwKVOjg==","signatures":[{"sig":"MEQCICa/tlvFT88HhXnBkbRKp3WFaSG6alDx5s3bwvn4gwDeAiABN2M5KDiX/oYiiaUZQBL+xsZnpNXQ5GNM6z2ALKmPTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOmBYCRA9TVsSAnZWagAAhNsQAKR1PH7wA3W8plTbC8qy\nXRf0Rs9+v0lwHRg38LSGLkRop3F6Lt5pvjHPd8e1KbK5NMuPDPT5phF8vqBK\nN49uCgZ13Q5gJdboUJemgEluaSfbbr7JZ3rd8fL//aTSxSTPGbDfr312Bw44\nGwn234FOFJJSJk4pweg4HdP5FioTDmdjRMeuYZiYYFptTsYCbULsZ/K/HQja\nb3WmeYNGWO3i388le6Cs0h3xe0ki0noplScYoEnopIDJJQs9RclNSuSRA+22\naVm6myg3+w7baaCkwmviXvJKfM9LZS2Njfx9YMqnO0clgar1qKioGodIHuPG\nwxQ1gJvkBMWJanBmMsgl2MThOc8xxk4c0ogMuE/za5jz1UCKl1dplFwp51BC\nxoWD9zvhcEbeUTGn1NdXVLI/dWAxWvn8q82LKNo1GvojG2dldxtj3dATLDTR\n+WF57jkFVwdOwOB4Dpx9oo2TTfGttP8UK6xuwBe5j6wy2rUAfaElSKt4tYPn\nQlIyEqpXBWkO6SBN/fWSPdKlMmpwk0g+jAb0nwwBK7nkX0yBEJ4DHIyy12Xu\nhxGy7qaZd5AzT3mCTCSXDtCNv7+oDiSTC9FSghEdKJTtwLXFln+bHsqJ+zQG\nAu/ybTgJ0yD6NRDL5pcguoeftv5zcjHK5NNeNpCxDRareJr63cM10waMWF/N\nAY6i\r\n=SuVd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","readme":"# Observable Membrane\n\nCreating robust JavaScript code becomes increasingly important as web applications become more sophisticated. The dynamic nature of JavaScript code at runtime has always presented challenges for developers.\n\nThis package implements an observable membrane in JavaScript using Proxies.\n\nA membrane can be created to observe access to a module graph, observe what the other part is attempting to do with certain objects, and even distort the way they see the module graph.\n\n## What is a Membrane\n\n* [Tom van Cutsem's original article, \"Isolating application sub-components with membranes\"](https://tvcutsem.github.io/membranes)\n* [Tom van Cutsem's original article, \"Membranes in JavaScript\"](https://tvcutsem.github.io/js-membranes)\n* [es-membrane library by Alexander J. Vincent](https://github.com/ajvincent/es-membrane)\n\n## Use Cases\n\nOne of the prime use-cases for observable membranes is the popular `@observed` or `@tracked` decorator used in components to detect mutations on the state of the component to re-render the component when needed. In this case, any object value set into a decorated field can be wrapped into an observable membrane to monitor if the object is accessed during the rendering phase, and if so, the component must be re-rendered when mutations on the object value are detected. And this process is applied not only at the object value level, but at any level in the object graph accessible via the observed object value.\n\nAdditionally, it supports distorting objects within an object graph, which could be used for:\n\n* Avoid leaking certain references.\n* Values observed through the membrane can be different representations of the original values.\n\n### Usage\n\nThe following example illustrates how to create an observable membrane, and proxies:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// yields 2\n\np.y.z;\n// yields 1\n```\n\n_Note: If the value that you're accessing via the membrane is an object that can be observed, then the membrane will return a proxy around it. In the example above, `o.y !== p.y` because it is a proxy that applies the exact same mechanism. In other words, the membrane is applicable to an entire object graph._\n\n#### Observing Access and Mutations\n\nThe most basic operation in an observable membrane is to observe property member access and mutations. For that, the constructor accepts an optional arguments `options` that accepts two callbacks, `valueObserved` and `valueMutated`:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n    valueMutated(target, key) {\n        // where target is the object that was mutated\n        // and key is the key that was mutated\n        console.log('mutated ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'accessed x'\n// yields 2\n\np.y.z;\n// console output -> 'accessed z'\n// yields 1\n\np.y.z = 3;\n// console output -> 'mutated z'\n// yields 3\n```\n\n#### Read Only Proxies\n\nAnother use-case for observable membranes is to prevent mutations in the object graph. For that, `ObservableMembrane` provides an additional method that gets a read-only version of any object value. One of the prime use-cases for read-only membranes is to hand over an object to another actor, observe how the actor uses that object reference, but prevent the actor from mutating the object. E.g.: passing an object property down to a child component that can consume the object value but not mutate it.\n\nThis is also a very cheap way of doing deep-freeze, although it is not exactly the same, but can cover a lot of ground without having to actually freeze the original object, or a copy of it:\n\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst r = membrane.getReadOnlyProxy(o);\n\nr.x;\n// yields 2\n\nr.y.z;\n// yields 1\n\nr.y.z = 2;\n// throws Error in dev-mode, and does nothing in production mode\n```\n\n#### Distortion\n\nAs described above, you can use distortions to avoid leaking non-observable objects and distorting values observed through the membrane:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueDistortion(value) {\n        if (value instanceof Node) {\n            throw new ReferenceError(`Invalid access to a non-observable Node`);\n        }\n        console.log('distorting ', value);\n        if (value === 1) {\n            return 10;\n        }\n        return value;\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n        node: document.createElement('p'),\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'distorting 2'\n// yields 2\n\np.y.z;\n// console output -> 'distorting 1'\n// yields 10\n\np.y.node;\n// throws ReferenceError\n```\n\n_Note: You could use a `WeakMap` to remap symbols to avoid leaking the original symbols and other non-observable objects through the distortion mechanism._\n\n#### Unwrapping Proxies\n\nFor advanced usages, the observable membrane instance offers the ability to unwrap any proxy generated by the membrane. This can be used to detect membrane presence and other detections that may be useful to framework authors. E.g.:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n    },\n};\n\nconst p = membrane.getProxy(o);\n\no.y !== p.x;\n// yields true because `p` is a proxy of `o`\n\no.y === membrane.unwrapProxy(p.y);\n// yields true because `membrane.unwrapProxy(p.y)` returns the original target `o.y`\n```\n\n### Observable Objects\n\nThis membrane implementation is tailored for what we call \"observable objects\", which are objects with basic functionalities that do not require identity to be preserved. Usually any object with the prototype chain set to `Object.prototype` or `null`. You can control what gets wrapped by implementing a custom callback for the `valueIsObservable` option:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueIsObservable(value) {\n        // intentionally checking for null\n        if (value === null) {\n            return false;\n        }\n\n        // treat all non-object types, including undefined, as non-observable values\n        if (typeof value !== 'object') {\n            return false;\n        }\n\n        if (isArray(value)) {\n            return true;\n        }\n\n        const proto = Reflect.getPrototypeOf(value);\n        return (proto === Object.prototype || proto === null);\n    },\n});\n\nconst o = {\n    x: 1\n};\nmembrane.getProxy(o) !== o; // yields true because it was wrapped\n\nmembrane.getProxy(document) !== document; // yields false because a DOM object is not observable\n```\n\nNote: be very careful about customizing `valueIsObservable`. Any object with methods that requires identity (e.g.: objects with private fields, or methods accessing weakmaps with the `this` value as a key), will simply not work because those methods will be called with the `this` value being the actual proxy.\n\n## Example\n\nThere are [runnable examples](https://github.com/salesforce/observable-membrane/tree/master/examples) in this Git repository. You must build this package as described in the [Contributing Guide](CONTRIBUTING.md) before attempting to run the examples. Additionally, some of the examples might be relying on features that are not supported in all browsers (e.g.: [reactivo-element](https://github.com/salesforce/observable-membrane/tree/master/examples/reactivo-element) example relies on Web Components APIs).\n\n## API\n\n### `new ObservableMembrane([config])`\n\nCreate a new membrane.\n\n**Parameters**\n\n* `config` [Object] [Optional] The membrane configuration\n    * `valueObserved` [Function] [Optional] Callback invoked when an observed  property is accessed. This function receives as argument the original target and the property key.\n    * `valueMutated` [Function] [Optional] Callback invoked when an observed property is mutated. This function receives as argument the original target and the property key.\n    * `valueDistortion` [Function] [Optional] Callback to apply distortion to the objects present in the object graph. This function receives as argument a newly added object in the object graph.\n    * `valueIsObservable` [Function] [Optional] Callback to determine whether or not a value qualifies as a proxy target for the membrane. The default implementation will only observe plain objects (objects with their prototype set to `null` or `Object.prototype`).\n    * `tagPropertyKey` [PropertyKey] [Optional] A valid string or symbol that can be used to identify proxies created by the membrane. This is useful for any kind of debugging tools or object identity mechanism.\n\n\n### `ObservableMembrane.prototype.getProxy(object)`\n\nWrap an object in the membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.getReadOnlyProxy(object)`\n\nWrap an object in the read-only membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.unwrapProxy(proxy)`\n\nUnwrap the proxified version of the object from the membrane and return it's original value.\n\n**Parameters**\n\n* `proxy` [Object] Proxified object to unwrap from the membrane.\n\n\n## Limitations and Other Features\n\n* Not all objects can be wrapped by this membrane. More information about this in the examples above.\n* Distortion of Symbols and other built-in objects is possible via `valueDistortion` mechanism to avoid leaking internal.\n* The ability for the membrane creator to revoke all proxies within it to prevent further mutations to the underlying objects (aka, membrane shutdown switch) is not supported at the moment.\n* A value mutation that is set to a read-only proxy value is allowed, but the subtree will still be read-only, e.g.: `const p = membrane.getProxy({}); p.abc = membrane.getReadOnlyProxy({}); p.abc.qwe = 1;` will throw because the value assigned to `abc` is still read only.\n\n## Browser Compatibility\n\nObservable membranes requires Proxy (ECMAScript 6) [to be available](https://caniuse.com/#search=proxy).\n\n## Development State\n\nThis library is production ready, it has been used at Salesforce in production for over a year. It is very lightweight (~1k - minified and gzipped), that can be used with any framework or library. It is designed to be very performant.\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](CONTRIBUTING.md) before making a pull request.\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (C) 2017 salesforce.com, Inc.\n","gitHead":"ce349d00790157c54fdd93d646cd486c9e8aae4f","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","release:version":"./scripts/release/version.js","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","release:publish:ci":"./scripts/release/publish.js"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"nolanlawson","email":"nolan@nolanlawson.com"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"7.19.1","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"resolutions":{"**/optimist/minimist":"1.2.5"},"_nodeVersion":"16.5.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.1.0","execa":"^5.1.1","is-ci":"^3.0.0","tslib":"^2.3.1","rollup":"^2.56.3","semver":"^7.3.5","tslint":"^6.1.3","ts-jest":"^27.0.5","typescript":"4.3.5","@types/jest":"^27.0.1","@types/node":"^16.7.13","rollup-plugin-terser":"^7.0.2","@rollup/plugin-replace":"^3.0.0","@rollup/plugin-typescript":"^8.2.5","conventional-changelog-cli":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_1.1.3_1631215704339_0.5195013129859423","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"observable-membrane","version":"1.1.4","keywords":["proxy","membrane","observe","mutation","track"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@1.1.4","maintainers":[{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"jye-sf","email":"jye@salesforce.com"},{"name":"rui.qiu","email":"rui.qiu@salesforce.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"jodarove","email":"jodarove@gmail.com"},{"name":"abdulsattar","email":"asattar.md@gmail.com"},{"name":"nolanlawson","email":"nolan@nolanlawson.com"},{"name":"jmsjtu","email":"jmsjtu@gmail.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"//":"Currently can't upgrade TypeScript to v4.4.2 because it breaks Rollup: https://git.io/JuCcs","dist":{"shasum":"f4e1a120623e754f314f0c573875c4f0ed7505cd","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-1.1.4.tgz","fileCount":4,"integrity":"sha512-kd5YeQKTT4l8DTkNI4AeSvUtp/RL42rkyUVYB9IbJ9UW5w4EjYGHJ4kRuZY57y5H2kpx5ME+ApjzlvF9MQwXeA==","signatures":[{"sig":"MEUCICJFVqv7YBwEcPwcsED1a6gBkX9V4gPEby1nRmLQYAiTAiEAi3Lmrdwb3ad6LKQ6BqN80eO4FjqVcs8Ip9PgrdmziR0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14693},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","readme":"# Observable Membrane\n\nCreating robust JavaScript code becomes increasingly important as web applications become more sophisticated. The dynamic nature of JavaScript code at runtime has always presented challenges for developers.\n\nThis package implements an observable membrane in JavaScript using Proxies.\n\nA membrane can be created to observe access to a module graph, observe what the other part is attempting to do with certain objects, and even distort the way they see the module graph.\n\n## What is a Membrane\n\n* [Tom van Cutsem's original article, \"Isolating application sub-components with membranes\"](https://tvcutsem.github.io/membranes)\n* [Tom van Cutsem's original article, \"Membranes in JavaScript\"](https://tvcutsem.github.io/js-membranes)\n* [es-membrane library by Alexander J. Vincent](https://github.com/ajvincent/es-membrane)\n\n## Use Cases\n\nOne of the prime use-cases for observable membranes is the popular `@observed` or `@tracked` decorator used in components to detect mutations on the state of the component to re-render the component when needed. In this case, any object value set into a decorated field can be wrapped into an observable membrane to monitor if the object is accessed during the rendering phase, and if so, the component must be re-rendered when mutations on the object value are detected. And this process is applied not only at the object value level, but at any level in the object graph accessible via the observed object value.\n\nAdditionally, it supports distorting objects within an object graph, which could be used for:\n\n* Avoid leaking certain references.\n* Values observed through the membrane can be different representations of the original values.\n\n### Usage\n\nThe following example illustrates how to create an observable membrane, and proxies:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// yields 2\n\np.y.z;\n// yields 1\n```\n\n_Note: If the value that you're accessing via the membrane is an object that can be observed, then the membrane will return a proxy around it. In the example above, `o.y !== p.y` because it is a proxy that applies the exact same mechanism. In other words, the membrane is applicable to an entire object graph._\n\n#### Observing Access and Mutations\n\nThe most basic operation in an observable membrane is to observe property member access and mutations. For that, the constructor accepts an optional arguments `options` that accepts two callbacks, `valueObserved` and `valueMutated`:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n    valueMutated(target, key) {\n        // where target is the object that was mutated\n        // and key is the key that was mutated\n        console.log('mutated ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'accessed x'\n// yields 2\n\np.y.z;\n// console output -> 'accessed z'\n// yields 1\n\np.y.z = 3;\n// console output -> 'mutated z'\n// yields 3\n```\n\n#### Read Only Proxies\n\nAnother use-case for observable membranes is to prevent mutations in the object graph. For that, `ObservableMembrane` provides an additional method that gets a read-only version of any object value. One of the prime use-cases for read-only membranes is to hand over an object to another actor, observe how the actor uses that object reference, but prevent the actor from mutating the object. E.g.: passing an object property down to a child component that can consume the object value but not mutate it.\n\nThis is also a very cheap way of doing deep-freeze, although it is not exactly the same, but can cover a lot of ground without having to actually freeze the original object, or a copy of it:\n\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst r = membrane.getReadOnlyProxy(o);\n\nr.x;\n// yields 2\n\nr.y.z;\n// yields 1\n\nr.y.z = 2;\n// throws Error in dev-mode, and does nothing in production mode\n```\n\n#### Distortion\n\nAs described above, you can use distortions to avoid leaking non-observable objects and distorting values observed through the membrane:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueDistortion(value) {\n        if (value instanceof Node) {\n            throw new ReferenceError(`Invalid access to a non-observable Node`);\n        }\n        console.log('distorting ', value);\n        if (value === 1) {\n            return 10;\n        }\n        return value;\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n        node: document.createElement('p'),\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'distorting 2'\n// yields 2\n\np.y.z;\n// console output -> 'distorting 1'\n// yields 10\n\np.y.node;\n// throws ReferenceError\n```\n\n_Note: You could use a `WeakMap` to remap symbols to avoid leaking the original symbols and other non-observable objects through the distortion mechanism._\n\n#### Unwrapping Proxies\n\nFor advanced usages, the observable membrane instance offers the ability to unwrap any proxy generated by the membrane. This can be used to detect membrane presence and other detections that may be useful to framework authors. E.g.:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n    },\n};\n\nconst p = membrane.getProxy(o);\n\no.y !== p.x;\n// yields true because `p` is a proxy of `o`\n\no.y === membrane.unwrapProxy(p.y);\n// yields true because `membrane.unwrapProxy(p.y)` returns the original target `o.y`\n```\n\n### Observable Objects\n\nThis membrane implementation is tailored for what we call \"observable objects\", which are objects with basic functionalities that do not require identity to be preserved. Usually any object with the prototype chain set to `Object.prototype` or `null`. You can control what gets wrapped by implementing a custom callback for the `valueIsObservable` option:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueIsObservable(value) {\n        // intentionally checking for null\n        if (value === null) {\n            return false;\n        }\n\n        // treat all non-object types, including undefined, as non-observable values\n        if (typeof value !== 'object') {\n            return false;\n        }\n\n        if (isArray(value)) {\n            return true;\n        }\n\n        const proto = Reflect.getPrototypeOf(value);\n        return (proto === Object.prototype || proto === null);\n    },\n});\n\nconst o = {\n    x: 1\n};\nmembrane.getProxy(o) !== o; // yields true because it was wrapped\n\nmembrane.getProxy(document) !== document; // yields false because a DOM object is not observable\n```\n\nNote: be very careful about customizing `valueIsObservable`. Any object with methods that requires identity (e.g.: objects with private fields, or methods accessing weakmaps with the `this` value as a key), will simply not work because those methods will be called with the `this` value being the actual proxy.\n\n## Example\n\nThere are [runnable examples](https://github.com/salesforce/observable-membrane/tree/master/examples) in this Git repository. You must build this package as described in the [Contributing Guide](CONTRIBUTING.md) before attempting to run the examples. Additionally, some of the examples might be relying on features that are not supported in all browsers (e.g.: [reactivo-element](https://github.com/salesforce/observable-membrane/tree/master/examples/reactivo-element) example relies on Web Components APIs).\n\n## API\n\n### `new ObservableMembrane([config])`\n\nCreate a new membrane.\n\n**Parameters**\n\n* `config` [Object] [Optional] The membrane configuration\n    * `valueObserved` [Function] [Optional] Callback invoked when an observed  property is accessed. This function receives as argument the original target and the property key.\n    * `valueMutated` [Function] [Optional] Callback invoked when an observed property is mutated. This function receives as argument the original target and the property key.\n    * `valueDistortion` [Function] [Optional] Callback to apply distortion to the objects present in the object graph. This function receives as argument a newly added object in the object graph.\n    * `valueIsObservable` [Function] [Optional] Callback to determine whether or not a value qualifies as a proxy target for the membrane. The default implementation will only observe plain objects (objects with their prototype set to `null` or `Object.prototype`).\n    * `tagPropertyKey` [PropertyKey] [Optional] A valid string or symbol that can be used to identify proxies created by the membrane. This is useful for any kind of debugging tools or object identity mechanism.\n\n\n### `ObservableMembrane.prototype.getProxy(object)`\n\nWrap an object in the membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.getReadOnlyProxy(object)`\n\nWrap an object in the read-only membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.unwrapProxy(proxy)`\n\nUnwrap the proxified version of the object from the membrane and return it's original value.\n\n**Parameters**\n\n* `proxy` [Object] Proxified object to unwrap from the membrane.\n\n\n## Limitations and Other Features\n\n* Not all objects can be wrapped by this membrane. More information about this in the examples above.\n* Distortion of Symbols and other built-in objects is possible via `valueDistortion` mechanism to avoid leaking internal.\n* The ability for the membrane creator to revoke all proxies within it to prevent further mutations to the underlying objects (aka, membrane shutdown switch) is not supported at the moment.\n* A value mutation that is set to a read-only proxy value is allowed, but the subtree will still be read-only, e.g.: `const p = membrane.getProxy({}); p.abc = membrane.getReadOnlyProxy({}); p.abc.qwe = 1;` will throw because the value assigned to `abc` is still read only.\n\n## Browser Compatibility\n\nObservable membranes requires Proxy (ECMAScript 6) [to be available](https://caniuse.com/#search=proxy).\n\n## Development State\n\nThis library is production ready, it has been used at Salesforce in production for over a year. It is very lightweight (~1k - minified and gzipped), that can be used with any framework or library. It is designed to be very performant.\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](CONTRIBUTING.md) before making a pull request.\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (C) 2017 salesforce.com, Inc.\n","gitHead":"ee036fd293c26656ac676a0eec085c3cd9bd344d","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","release:version":"./scripts/release/version.js","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","release:publish:ci":"./scripts/release/publish.js"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"lwc-admin","email":"admin@lwcjs.org"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"6.14.15","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"resolutions":{"**/optimist/minimist":"1.2.5"},"_nodeVersion":"14.18.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.1.0","execa":"^5.1.1","is-ci":"^3.0.0","tslib":"^2.3.1","rollup":"^2.56.3","semver":"^7.3.5","tslint":"^6.1.3","ts-jest":"^27.0.5","typescript":"4.3.5","@types/jest":"^27.0.1","@types/node":"^16.7.13","rollup-plugin-terser":"^7.0.2","@rollup/plugin-replace":"^3.0.0","@rollup/plugin-typescript":"^8.2.5","conventional-changelog-cli":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_1.1.4_1635800585733_0.029528109765387223","host":"s3://npm-registry-packages"}},"1.1.5":{"name":"observable-membrane","version":"1.1.5","keywords":["proxy","membrane","observe","mutation","track"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@1.1.5","maintainers":[{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"jye-sf","email":"jye@salesforce.com"},{"name":"rui.qiu","email":"rui.qiu@salesforce.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"jodarove","email":"jodarove@gmail.com"},{"name":"abdulsattar","email":"asattar.md@gmail.com"},{"name":"nolanlawson","email":"nolan@nolanlawson.com"},{"name":"jmsjtu","email":"jmsjtu@gmail.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"//":"Currently can't upgrade TypeScript to v4.4.2 because it breaks Rollup: https://git.io/JuCcs","dist":{"shasum":"7db964f8f948ed44946f3a9885ea2e9b53f7b119","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-1.1.5.tgz","fileCount":15,"integrity":"sha512-C7kZClqHPyujOKA+/qjnvZDV+i3wVY3IMJJ68tvELNj90vzs7LtiHIp8jaJD0M5OOU4J3Lx69yh2huaWo8o+gg==","signatures":[{"sig":"MEUCIQCtAaMQ2I39uszBA6Lo8ubilzNR5HwVA5NPoghnX7J8dgIgWjCgBVxWlhAyTg/URX9k050VfHybCrSbNxMq2HxB4po=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94384},"main":"dist/commonjs/observable-membrane.js","module":"dist/modules/observable-membrane.js","readme":"# Observable Membrane\n\nCreating robust JavaScript code becomes increasingly important as web applications become more sophisticated. The dynamic nature of JavaScript code at runtime has always presented challenges for developers.\n\nThis package implements an observable membrane in JavaScript using Proxies.\n\nA membrane can be created to observe access to a module graph, observe what the other part is attempting to do with certain objects, and even distort the way they see the module graph.\n\n## What is a Membrane\n\n* [Tom van Cutsem's original article, \"Isolating application sub-components with membranes\"](https://tvcutsem.github.io/membranes)\n* [Tom van Cutsem's original article, \"Membranes in JavaScript\"](https://tvcutsem.github.io/js-membranes)\n* [es-membrane library by Alexander J. Vincent](https://github.com/ajvincent/es-membrane)\n\n## Use Cases\n\nOne of the prime use-cases for observable membranes is the popular `@observed` or `@tracked` decorator used in components to detect mutations on the state of the component to re-render the component when needed. In this case, any object value set into a decorated field can be wrapped into an observable membrane to monitor if the object is accessed during the rendering phase, and if so, the component must be re-rendered when mutations on the object value are detected. And this process is applied not only at the object value level, but at any level in the object graph accessible via the observed object value.\n\nAdditionally, it supports distorting objects within an object graph, which could be used for:\n\n* Avoid leaking certain references.\n* Values observed through the membrane can be different representations of the original values.\n\n### Usage\n\nThe following example illustrates how to create an observable membrane, and proxies:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// yields 2\n\np.y.z;\n// yields 1\n```\n\n_Note: If the value that you're accessing via the membrane is an object that can be observed, then the membrane will return a proxy around it. In the example above, `o.y !== p.y` because it is a proxy that applies the exact same mechanism. In other words, the membrane is applicable to an entire object graph._\n\n#### Observing Access and Mutations\n\nThe most basic operation in an observable membrane is to observe property member access and mutations. For that, the constructor accepts an optional arguments `options` that accepts two callbacks, `valueObserved` and `valueMutated`:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n    valueMutated(target, key) {\n        // where target is the object that was mutated\n        // and key is the key that was mutated\n        console.log('mutated ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'accessed x'\n// yields 2\n\np.y.z;\n// console output -> 'accessed z'\n// yields 1\n\np.y.z = 3;\n// console output -> 'mutated z'\n// yields 3\n```\n\n#### Read Only Proxies\n\nAnother use-case for observable membranes is to prevent mutations in the object graph. For that, `ObservableMembrane` provides an additional method that gets a read-only version of any object value. One of the prime use-cases for read-only membranes is to hand over an object to another actor, observe how the actor uses that object reference, but prevent the actor from mutating the object. E.g.: passing an object property down to a child component that can consume the object value but not mutate it.\n\nThis is also a very cheap way of doing deep-freeze, although it is not exactly the same, but can cover a lot of ground without having to actually freeze the original object, or a copy of it:\n\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst r = membrane.getReadOnlyProxy(o);\n\nr.x;\n// yields 2\n\nr.y.z;\n// yields 1\n\nr.y.z = 2;\n// throws Error in dev-mode, and does nothing in production mode\n```\n\n#### Distortion\n\nAs described above, you can use distortions to avoid leaking non-observable objects and distorting values observed through the membrane:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueDistortion(value) {\n        if (value instanceof Node) {\n            throw new ReferenceError(`Invalid access to a non-observable Node`);\n        }\n        console.log('distorting ', value);\n        if (value === 1) {\n            return 10;\n        }\n        return value;\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n        node: document.createElement('p'),\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'distorting 2'\n// yields 2\n\np.y.z;\n// console output -> 'distorting 1'\n// yields 10\n\np.y.node;\n// throws ReferenceError\n```\n\n_Note: You could use a `WeakMap` to remap symbols to avoid leaking the original symbols and other non-observable objects through the distortion mechanism._\n\n#### Unwrapping Proxies\n\nFor advanced usages, the observable membrane instance offers the ability to unwrap any proxy generated by the membrane. This can be used to detect membrane presence and other detections that may be useful to framework authors. E.g.:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n    },\n};\n\nconst p = membrane.getProxy(o);\n\no.y !== p.x;\n// yields true because `p` is a proxy of `o`\n\no.y === membrane.unwrapProxy(p.y);\n// yields true because `membrane.unwrapProxy(p.y)` returns the original target `o.y`\n```\n\n### Observable Objects\n\nThis membrane implementation is tailored for what we call \"observable objects\", which are objects with basic functionalities that do not require identity to be preserved. Usually any object with the prototype chain set to `Object.prototype` or `null`. You can control what gets wrapped by implementing a custom callback for the `valueIsObservable` option:\n\n```js\nimport ObservableMembrane from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueIsObservable(value) {\n        // intentionally checking for null\n        if (value === null) {\n            return false;\n        }\n\n        // treat all non-object types, including undefined, as non-observable values\n        if (typeof value !== 'object') {\n            return false;\n        }\n\n        if (isArray(value)) {\n            return true;\n        }\n\n        const proto = Reflect.getPrototypeOf(value);\n        return (proto === Object.prototype || proto === null);\n    },\n});\n\nconst o = {\n    x: 1\n};\nmembrane.getProxy(o) !== o; // yields true because it was wrapped\n\nmembrane.getProxy(document) !== document; // yields false because a DOM object is not observable\n```\n\nNote: be very careful about customizing `valueIsObservable`. Any object with methods that requires identity (e.g.: objects with private fields, or methods accessing weakmaps with the `this` value as a key), will simply not work because those methods will be called with the `this` value being the actual proxy.\n\n## Example\n\nThere are [runnable examples](https://github.com/salesforce/observable-membrane/tree/master/examples) in this Git repository. You must build this package as described in the [Contributing Guide](CONTRIBUTING.md) before attempting to run the examples. Additionally, some of the examples might be relying on features that are not supported in all browsers (e.g.: [reactivo-element](https://github.com/salesforce/observable-membrane/tree/master/examples/reactivo-element) example relies on Web Components APIs).\n\n## API\n\n### `new ObservableMembrane([config])`\n\nCreate a new membrane.\n\n**Parameters**\n\n* `config` [Object] [Optional] The membrane configuration\n    * `valueObserved` [Function] [Optional] Callback invoked when an observed  property is accessed. This function receives as argument the original target and the property key.\n    * `valueMutated` [Function] [Optional] Callback invoked when an observed property is mutated. This function receives as argument the original target and the property key.\n    * `valueDistortion` [Function] [Optional] Callback to apply distortion to the objects present in the object graph. This function receives as argument a newly added object in the object graph.\n    * `valueIsObservable` [Function] [Optional] Callback to determine whether or not a value qualifies as a proxy target for the membrane. The default implementation will only observe plain objects (objects with their prototype set to `null` or `Object.prototype`).\n    * `tagPropertyKey` [PropertyKey] [Optional] A valid string or symbol that can be used to identify proxies created by the membrane. This is useful for any kind of debugging tools or object identity mechanism.\n\n\n### `ObservableMembrane.prototype.getProxy(object)`\n\nWrap an object in the membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.getReadOnlyProxy(object)`\n\nWrap an object in the read-only membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.unwrapProxy(proxy)`\n\nUnwrap the proxified version of the object from the membrane and return it's original value.\n\n**Parameters**\n\n* `proxy` [Object] Proxified object to unwrap from the membrane.\n\n\n## Limitations and Other Features\n\n* Not all objects can be wrapped by this membrane. More information about this in the examples above.\n* Distortion of Symbols and other built-in objects is possible via `valueDistortion` mechanism to avoid leaking internal.\n* The ability for the membrane creator to revoke all proxies within it to prevent further mutations to the underlying objects (aka, membrane shutdown switch) is not supported at the moment.\n* A value mutation that is set to a read-only proxy value is allowed, but the subtree will still be read-only, e.g.: `const p = membrane.getProxy({}); p.abc = membrane.getReadOnlyProxy({}); p.abc.qwe = 1;` will throw because the value assigned to `abc` is still read only.\n\n## Browser Compatibility\n\nObservable membranes requires Proxy (ECMAScript 6) [to be available](https://caniuse.com/#search=proxy).\n\n## Development State\n\nThis library is production ready, it has been used at Salesforce in production for over a year. It is very lightweight (~1k - minified and gzipped), that can be used with any framework or library. It is designed to be very performant.\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](CONTRIBUTING.md) before making a pull request.\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (C) 2017 salesforce.com, Inc.\n","gitHead":"a8e12874fdb48a75cac3a6239881b98da6202fc2","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"tsc --emitDeclarationOnly && rollup -c","prepare":"yarn build","prebuild":"rm -rf dist","changelog":"yarn changelog:generate && yarn changelog:publish","release:version":"./scripts/release/version.js","changelog:publish":"git add CHANGELOG.md && git commit -m 'docs(changelog): publish release changelog' && git push","changelog:generate":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","release:publish:ci":"./scripts/release/publish.js"},"typings":"dist/types/main.d.ts","_npmUser":{"name":"lwc-admin","email":"admin@lwcjs.org"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"6.14.15","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"resolutions":{"**/optimist/minimist":"1.2.5"},"_nodeVersion":"14.18.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.1.0","execa":"^5.1.1","is-ci":"^3.0.0","tslib":"^2.3.1","rollup":"^2.56.3","semver":"^7.3.5","tslint":"^6.1.3","ts-jest":"^27.0.5","typescript":"4.3.5","@types/jest":"^27.0.1","@types/node":"^16.7.13","rollup-plugin-terser":"^7.0.2","@rollup/plugin-replace":"^3.0.0","@rollup/plugin-typescript":"^8.2.5","conventional-changelog-cli":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_1.1.5_1635805634380_0.8273987902099731","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"observable-membrane","version":"2.0.0","keywords":["proxy","membrane","observe","mutation","track"],"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","_id":"observable-membrane@2.0.0","maintainers":[{"name":"lwc-admin","email":"admin@lwcjs.org"},{"name":"caridy","email":"caridy@gmail.com"},{"name":"tbliss","email":"tbliss@salesforce.com"},{"name":"pmdartus","email":"dartus.pierremarie@gmail.com"},{"name":"ekashida","email":"ekashida@gmail.com"},{"name":"diervo","email":"elfogris@gmail.com"},{"name":"gr8gatsby","email":"kevinhill@live.com"},{"name":"kevinv11n","email":"kevin@v11n.com"},{"name":"jye-sf","email":"jye@salesforce.com"},{"name":"rui.qiu","email":"rui.qiu@salesforce.com"},{"name":"ravi.jayaramappa","email":"ravi.jayaramappa@salesforce.com"},{"name":"jodarove","email":"jodarove@gmail.com"},{"name":"abdulsattar","email":"asattar.md@gmail.com"},{"name":"nolanlawson","email":"nolan@nolanlawson.com"},{"name":"jmsjtu","email":"jmsjtu@gmail.com"}],"homepage":"https://github.com/salesforce/observable-membrane","bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"dist":{"shasum":"a39ef2f8ec355c11f0275e567f3de73632493dc1","tarball":"https://registry.npmjs.org/observable-membrane/-/observable-membrane-2.0.0.tgz","fileCount":13,"integrity":"sha512-V4KOKc3vMBjg/G8P4M7GYFZCTXQKxUIaCucWnrgPg/3JJkcKf9DtBmlp7NgogMWuLq4b8f3Q9yivNTztaaPPWA==","signatures":[{"sig":"MEYCIQDlWNuqkPYLEnfa69cPYCT3ufvKxDqMnzXUQRI64lYH0wIhANl7Amxx38lzN4Wfhdq6p70s+JY0dmhFabhvzG/E5r4Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm5e+CRA9TVsSAnZWagAAYwsP/0I3bI+qAkuugIr/owmD\nzfFEHZ8MKE3Y1T4zi6/Hk56uMoiTOEAtG5tr2Clb2IkQfdGxY6gf+ms4nrwv\nfs1zZek8lRTFalu+qnCXovd4NZmHXm8tOsBhUxGGkD48zPVFyxm74N85IJHD\nVOKZKIZWshZlJwOfld0qDMkrrMEArNnZDveB4+S0OAdBzUYQwHk1OIxLUK1d\nuAfT9EwVal/pQ33n1REa/1Doc0qTmdkRR089roOcZPS8UMM2SG/HzFc6hYef\n3KCD97B1zAFtJU6/Fd2wttuvcPgGR7vJ9A4qYxCFNNoWGavc2A/GxO8zGfZP\nE7Sd0CCO8s+AB9wCOKl/1AbUz6sU09bNtVAmK0fZOiCDpD8e846NvO18O51g\n0q5U/KtUuErTy/AtXUgVLTg21RJAzzsgZK653LQiBtT66fOJovspawAT9n7r\nePNfw5UuwrROtnGi4kq6Bk8L1j8pqW9xtyKMwfj1jKrTFlLYYxjTgyQDeA2H\nwHRx1kBud9Yk6UrsemoSJ6vJDTfAcCSEZEeDb6uanerV80zKo7xbFvDmNs1Z\nCY63JEDdrIBnSxXikzGc1A7lr/Puu9UXkwceiClDwepugtLczCrR8apruZW/\nNtk0/IX76F9k83KJlx5sN5sUNtX2fofpmO2x1iAuP2f+B4lseC1/r3KYr0Vz\n/nlB\r\n=wGAS\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","module":"dist/observable-membrane.js","readme":"# Observable Membrane\n\nCreating robust JavaScript code becomes increasingly important as web applications become more sophisticated. The dynamic nature of JavaScript code at runtime has always presented challenges for developers.\n\nThis package implements an observable membrane in JavaScript using Proxies.\n\nA membrane can be created to observe access to a module graph and observe what the other part is attempting to do with certain objects.\n\n## What is a Membrane\n\n* [Tom van Cutsem's original article, \"Isolating application sub-components with membranes\"](https://tvcutsem.github.io/membranes)\n* [Tom van Cutsem's original article, \"Membranes in JavaScript\"](https://tvcutsem.github.io/js-membranes)\n* [es-membrane library by Alexander J. Vincent](https://github.com/ajvincent/es-membrane)\n\n## Use Cases\n\nOne of the prime use-cases for observable membranes is the popular `@observed` or `@tracked` decorator used in components to detect mutations on the state of the component to re-render the component when needed. In this case, any object value set into a decorated field can be wrapped into an observable membrane to monitor if the object is accessed during the rendering phase, and if so, the component must be re-rendered when mutations on the object value are detected. And this process is applied not only at the object value level, but at any level in the object graph accessible via the observed object value.\n\n### Usage\n\nThe following example illustrates how to create an observable membrane, and proxies:\n\n```js\nimport { ObservableMembrane } from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// yields 2\n\np.y.z;\n// yields 1\n```\n\n_Note: If the value that you're accessing via the membrane is an object that can be observed, then the membrane will return a proxy around it. In the example above, `o.y !== p.y` because it is a proxy that applies the exact same mechanism. In other words, the membrane is applicable to an entire object graph._\n\n#### Observing Access and Mutations\n\nThe most basic operation in an observable membrane is to observe property member access and mutations. For that, the constructor accepts an optional arguments `options` that accepts two callbacks, `valueObserved` and `valueMutated`:\n\n```js\nimport { ObservableMembrane } from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n    valueMutated(target, key) {\n        // where target is the object that was mutated\n        // and key is the key that was mutated\n        console.log('mutated ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst p = membrane.getProxy(o);\n\np.x;\n// console output -> 'accessed x'\n// yields 2\n\np.y.z;\n// console output -> 'accessed z'\n// yields 1\n\np.y.z = 3;\n// console output -> 'mutated z'\n// yields 3\n```\n\n#### Read Only Proxies\n\nAnother use-case for observable membranes is to prevent mutations in the object graph. For that, `ObservableMembrane` provides an additional method that gets a read-only version of any object value. One of the prime use-cases for read-only membranes is to hand over an object to another actor, observe how the actor uses that object reference, but prevent the actor from mutating the object. E.g.: passing an object property down to a child component that can consume the object value but not mutate it.\n\nThis is also a very cheap way of doing deep-freeze, although it is not exactly the same, but can cover a lot of ground without having to actually freeze the original object, or a copy of it:\n\n\n```js\nimport { ObservableMembrane } from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueObserved(target, key) {\n        // where target is the object that was accessed\n        // and key is the key that was read\n        console.log('accessed ', key);\n    },\n});\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1\n    },\n};\n\nconst r = membrane.getReadOnlyProxy(o);\n\nr.x;\n// yields 2\n\nr.y.z;\n// yields 1\n\nr.y.z = 2;\n// throws Error in dev-mode, and does nothing in production mode\n```\n\n#### Unwrapping Proxies\n\nFor advanced usages, the observable membrane instance offers the ability to unwrap any proxy generated by the membrane. This can be used to detect membrane presence and other detections that may be useful to framework authors. E.g.:\n\n```js\nimport { ObservableMembrane } from 'observable-membrane';\n\nconst membrane = new ObservableMembrane();\n\nconst o = {\n    x: 2,\n    y: {\n        z: 1,\n    },\n};\n\nconst p = membrane.getProxy(o);\n\no.y !== p.x;\n// yields true because `p` is a proxy of `o`\n\no.y === membrane.unwrapProxy(p.y);\n// yields true because `membrane.unwrapProxy(p.y)` returns the original target `o.y`\n```\n\n### Observable Objects\n\nThis membrane implementation is tailored for what we call \"observable objects\", which are objects with basic functionalities that do not require identity to be preserved. Usually any object with the prototype chain set to `Object.prototype` or `null`. You can control what gets wrapped by implementing a custom callback for the `valueIsObservable` option:\n\n```js\nimport { ObservableMembrane } from 'observable-membrane';\n\nconst membrane = new ObservableMembrane({\n    valueIsObservable(value) {\n        // intentionally checking for null\n        if (value === null) {\n            return false;\n        }\n\n        // treat all non-object types, including undefined, as non-observable values\n        if (typeof value !== 'object') {\n            return false;\n        }\n\n        if (isArray(value)) {\n            return true;\n        }\n\n        const proto = Reflect.getPrototypeOf(value);\n        return (proto === Object.prototype || proto === null);\n    },\n});\n\nconst o = {\n    x: 1\n};\nmembrane.getProxy(o) !== o; // yields true because it was wrapped\n\nmembrane.getProxy(document) !== document; // yields false because a DOM object is not observable\n```\n\nNote: be very careful about customizing `valueIsObservable`. Any object with methods that requires identity (e.g.: objects with private fields, or methods accessing weakmaps with the `this` value as a key), will simply not work because those methods will be called with the `this` value being the actual proxy.\n\n## Example\n\nThere are [runnable examples](https://github.com/salesforce/observable-membrane/tree/master/examples) in this Git repository. You must build this package as described in the [Contributing Guide](CONTRIBUTING.md) before attempting to run the examples. Additionally, some of the examples might be relying on features that are not supported in all browsers (e.g.: [reactivo-element](https://github.com/salesforce/observable-membrane/tree/master/examples/reactivo-element) example relies on Web Components APIs).\n\n## API\n\n### `new ObservableMembrane([config])`\n\nCreate a new membrane.\n\n**Parameters**\n\n* `config` [Object] [Optional] The membrane configuration\n    * `valueObserved` [Function] [Optional] Callback invoked when an observed  property is accessed. This function receives as argument the original target and the property key.\n    * `valueMutated` [Function] [Optional] Callback invoked when an observed property is mutated. This function receives as argument the original target and the property key.\n    * `valueIsObservable` [Function] [Optional] Callback to determine whether or not a value qualifies as a proxy target for the membrane. The default implementation will only observe plain objects (objects with their prototype set to `null` or `Object.prototype`).\n    * `tagPropertyKey` [PropertyKey] [Optional] A valid string or symbol that can be used to identify proxies created by the membrane. This is useful for any kind of debugging tools or object identity mechanism.\n\n\n### `ObservableMembrane.prototype.getProxy(object)`\n\nWrap an object in the membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.getReadOnlyProxy(object)`\n\nWrap an object in the read-only membrane. If the `object` is observable it will return a proxified version of the object, otherwise it returns the original value.\n\n**Parameters**\n\n* `object` [Object] The object to wrap in the membrane.\n\n\n### `ObservableMembrane.prototype.unwrapProxy(proxy)`\n\nUnwrap the proxified version of the object from the membrane and return it's original value.\n\n**Parameters**\n\n* `proxy` [Object] Proxified object to unwrap from the membrane.\n\n\n## Limitations and Other Features\n\n* Not all objects can be wrapped by this membrane. More information about this in the examples above.\n* The ability for the membrane creator to revoke all proxies within it to prevent further mutations to the underlying objects (aka, membrane shutdown switch) is not supported at the moment.\n* A value mutation that is set to a read-only proxy value is allowed, but the subtree will still be read-only, e.g.: `const p = membrane.getProxy({}); p.abc = membrane.getReadOnlyProxy({}); p.abc.qwe = 1;` will throw because the value assigned to `abc` is still read only.\n\n## Browser Compatibility\n\nObservable membranes requires Proxy (ECMAScript 6) [to be available](https://caniuse.com/#search=proxy).\n\n## Development State\n\nThis library is production ready, it has been used at Salesforce in production for over a year. It is very lightweight (~1k - minified and gzipped), that can be used with any framework or library. It is designed to be very performant.\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](CONTRIBUTING.md) before making a pull request.\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (C) 2017 salesforce.com, Inc.\n","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"exports":{"import":"./dist/observable-membrane.js","production":"./dist/observable-membrane.prod.js"},"gitHead":"bc9903cdc7ff5eb5fcf38fa51374c08d860d69f6","scripts":{"lint":"tslint -p tsconfig.json","test":"jest --config jest.config.js --coverage","build":"rollup -c","format":"prettier --write '{src,test,scripts}/**/*.{ts,js}'","prepare":"yarn build","prebuild":"rm -rf dist","format:check":"prettier --check '{src,test,scripts}/**/*.{ts,js}'","release:version":"./scripts/release/version.js","release:publish:ci":"./scripts/release/publish.js"},"typings":"dist/main.d.ts","_npmUser":{"name":"lwc-admin","email":"admin@lwcjs.org"},"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"_npmVersion":"6.14.15","description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","directories":{},"lint-staged":{"**/*.{ts,js}":"eslint","{src,test,scripts}/**/*.{ts,js}":"prettier --write"},"_nodeVersion":"14.18.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.1.0","execa":"^5.1.1","husky":"^7.0.4","is-ci":"^3.0.0","tslib":"^2.3.1","rollup":"^2.56.3","semver":"^7.3.5","tslint":"^6.1.3","ts-jest":"^27.0.5","prettier":"^2.4.1","typescript":"^4.3.5","@types/jest":"^27.0.1","@types/node":"^16.7.13","lint-staged":"^11.2.6","@commitlint/cli":"^14.1.0","@rollup/plugin-replace":"^3.0.0","@rollup/plugin-typescript":"^8.2.5","@commitlint/config-conventional":"^14.1.0"},"_npmOperationalInternal":{"tmp":"tmp/observable-membrane_2.0.0_1637586878727_0.5174692646513019","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-07-18T22:52:27.794Z","modified":"2026-05-21T17:20:12.574Z","0.25.0":"2018-07-18T22:52:27.896Z","0.24.0":"2018-07-19T01:58:48.037Z","0.24.1":"2018-07-19T01:59:32.275Z","0.24.2":"2018-07-19T02:01:01.226Z","0.24.0-beta.d48d78f8":"2018-07-19T02:11:56.796Z","0.19.9":"2018-07-24T22:51:56.203Z","0.24.12":"2018-07-26T19:11:12.101Z","0.24.14":"2018-08-01T05:52:41.378Z","0.18.0":"2018-09-09T08:47:31.404Z","0.26.0":"2018-11-19T22:28:28.792Z","0.26.1":"2019-03-14T00:04:37.626Z","0.27.0-alpha1":"2020-05-30T00:57:37.445Z","1.0.0":"2020-06-17T04:07:21.243Z","1.0.1":"2020-06-18T13:20:01.364Z","1.1.2":"2021-04-09T04:37:27.544Z","1.1.3-alpha.0":"2021-04-12T05:19:07.124Z","1.1.3":"2021-09-09T19:28:24.679Z","1.1.4":"2021-11-01T21:03:05.857Z","1.1.5":"2021-11-01T22:27:14.498Z","2.0.0":"2021-11-22T13:14:38.868Z"},"bugs":{"url":"https://github.com/salesforce/observable-membrane/issues"},"author":{"name":"David Turissini","email":"dturissini@salesforce.com"},"license":"MIT","homepage":"https://github.com/salesforce/observable-membrane","keywords":["proxy","membrane","observe","mutation","track"],"repository":{"url":"git+ssh://git@github.com/salesforce/observable-membrane.git","type":"git"},"description":"A Javascript Membrane implementation using Proxies to observe mutation on an object graph","maintainers":[{"email":"admin@lwcjs.org","name":"lwc-admin"},{"email":"caridy@gmail.com","name":"caridy"},{"email":"jye@salesforce.com","name":"jye-sf"},{"email":"ravi.jayaramappa@salesforce.com","name":"ravi.jayaramappa"},{"email":"jodarove@gmail.com","name":"jodarove"},{"email":"asattar.md@gmail.com","name":"abdulsattar"},{"email":"rv.darknight@gmail.com","name":"rax-it1"},{"email":"lpomerleau@salesforce.com","name":"lpomerleau"},{"email":"elfogris@gmail.com","name":"diervo"}],"readme":"","readmeFilename":""}