{"_id":"nests","_rev":"75-92bcc152a4438aa2cba152b776e5db45","name":"nests","dist-tags":{"latest":"2.3.1","alpha":"4.0.0-alpha.11"},"versions":{"1.0.0":{"name":"nests","version":"1.0.0","description":"Simple stores with a lot of control.","main":"./src/index.ts","scripts":{"build":"tsc","test":"node ./test.js"},"keywords":[],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"gitHead":"82f36f6688a15a0a732955f6e8373bedd8b0f768","_id":"nests@1.0.0","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-H0nortVGpi873D+x46jxKAtSFpuPfqJL2mYB76KQqUDA9z22l/ROtRX2ydziUuK0usTfqvu+iKVutgjL9I1Jtw==","shasum":"1a4a85dca275f34ce37559b6e8ed635303568e5f","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.0.tgz","fileCount":9,"unpackedSize":12690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMCJDCRA9TVsSAnZWagAA2vwP/RkOCSxbB5LvcNbcbOLf\npIG0J4ACp4JG5CAuZULFvNMuhObkTa49ZTFQehq19ZKbRDtDlMJwsIlW7HeT\nLdZZcMaklB9zFXaEXI8RVgyog06a+fx0wQ38UOGyXPmis2wwl84bj9UYl5tb\nJ7ztsJrpX8oD6ov0c3QpeaYPPu59AQTYv8T7u90kqF2OeudBCmOHJEVPQ9mv\nF07ttpLT4yOGvX6xGvmsf2ydWZKhWhjJ8VbogkbIuxUMMMix/HwMIFohYc84\nn0abAblrLX2RUf4ZUIJX9X3CybEV73KO2pbizdSru7fD271mDu0/2aTPafah\n+7asWOa5YkczEZP5RF0DaGFM9JeEyHIDmBZZYGe3bgScWQZrbhGBsy+mx3TS\n0GheSjwjoPgudv9NRjQcRCkdMBxwtZv6mrQwsGxGoUl/RMgOZMKRhqfrnz0t\n4VrCisFp1jfu81SnB7S9LeCYNGjHRpblvOsMmGhRKRirjcMpszHXHg1a3LsR\njmfsZWP55loJwY2C0xtIh++omrtPzWlQt0aakEHeONucHtyBWCi7G+mxo467\nDaxhy170ntvd6Q8tg7kKu+ipnlOrED0ewPO8eMzG6eoBC2wwilfMPuP0DZjv\njdoJJ2W2yQXIFRMbe87WB7szQUxZN4BA5w8FNPVx1NugF30GlTTjY5gMZNhF\nawJp\r\n=8Lg9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3gnZPN7JCxLXU8erCG43Gt+h2/7yGcNJNZhjVz2WJEQIgIGLPpnHrgIFCnGslReaVFFNm5BmHyoRwEWEsF2wov6E="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.0_1630544451504_0.9734407526224478"},"_hasShrinkwrap":false},"1.0.1":{"name":"nests","version":"1.0.1","description":"Simple stores with a lot of control.","main":"./src/index.ts","scripts":{"build":"tsc","test":"node ./test.js"},"keywords":[],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"gitHead":"30d8a8f562215b1839b628301d2c2e6d3c6b7209","_id":"nests@1.0.1","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-SEbSwt2yhEaM/kt/49KpoYvT557YcpLlxSWvTiQxhyGSYSyNhVMIErVxlnUT1soM044iE6ttpVZEKUpzZR0hAg==","shasum":"94c517d76e300bed2923d66efabbfac5f0e41efe","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.1.tgz","fileCount":9,"unpackedSize":12686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMCKfCRA9TVsSAnZWagAAmtIP/jBkeqdyQmmd5E2GO4Pi\nbPmFJ3EPcTlN0N50wnIZyWea0bv0mLVd9S3AV97EWuxUOe6HJPYwJkz0HNP/\nzAcLtIOPAkb0b9zQ6Ur93vkXnlkkRPnCCmr/D9CRkUgHs/XHH2kW9j8J1Akd\nw+Ck3sxoQqFz3cet8FjACivIPWo5WPU8hcppyd/nm//I00Ks5ZBItrKSImvJ\ncTzUy88tit9TQpZv1V6IF9KgXn9O4qD8bBRYNuHp8+U/HZVDhOXVAuHGygL5\nENKECZRo6icM/NrZn3KQr8MmebfErQ+++3lGImdBluxu4MRhGJLw60Ur/mF4\n8A9Mc6wQmcsNtO9dMVHimId9nW222sTzwry5ZEqjLSPHWkaQA0WZmkrP7HgS\n2iI3AiDGicc9NOZtCGzIRhhnbrOjM2U7QBQ4FHFg3dsetA0uefb9QEEnRL3z\nantlmFx2VZg9RvR3vAtibCGnpsxSVsfTT2iFG7kyKG6Fywhb239WESQ+08eS\negZP+s2qolOnHUstJdxGguAOVsROJr/VunCfVlyyJNTcOzTCIvYJxg93Qtk0\noNFnJl8trMIK0J/LT+o6bD4JjSucsz6lJavOkRm9/G+ftVsv4k+IiAuhSQoS\n48vk5l+vXz0uhUKA0ImgjKA109Ok5tXN4PEpwa6mOFFlpWj6LozvLqzkvBWv\nWsHJ\r\n=rdZY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJzejzR5eKcYlogbDUziRwauqwG27/9w0AluuZLMHeMwIgIbEzf8Fo+et8c94zO6uUg+cKMBekk6kgLoPlJkyYDGE="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.1_1630544543257_0.4874387483665421"},"_hasShrinkwrap":false},"1.0.2":{"name":"nests","version":"1.0.2","description":"Simple stores with a lot of control.","main":"./src/index.ts","scripts":{"build":"tsc","test":"node ./test.js"},"keywords":[],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"gitHead":"452aecc5639739bbebff066360d8f9b8ba21a9ef","_id":"nests@1.0.2","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-qqxLMLHq6h4AjbCAgFhWE01x2ZV4I+Ng9m7CqnfTK5u6WhCY1BdrYwwPmJnHJiQKFsQ1jTT0rUbz/ZcdPElf0A==","shasum":"f60d9945521325a5025374b9454d9dc82f77519d","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.2.tgz","fileCount":9,"unpackedSize":12790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMCTgCRA9TVsSAnZWagAA9F4QAI0dOUmuWRGAILPmUzX6\nDBkVdAMZePrbhy3I9S3tgk/3xiB6S25stZoVtihyUDrhJNkyAFiPDbkZx6bo\nprlgDuLBcYBFhZTukl8JyZNfrHjPjkETmFKZDizlU82U7uWrYzumMkhU2+sK\nL6+Wd2mxT+oYhPgInxxFNUhqur7JUVLf3K9Ih4MMX0vpFoHXCYYybVg80S0/\nn1OmipnfAAgYjkT4BPxayZ9ieePrRlu+BvkxzzZWuqtKn+pccJr2hhLOo76D\nWsU4jSXB9k9TkxSiAA2lmjWEy4jp1yM5RkBYl/QdgZ8D1qmawJnVmyXR5soU\nFWYDZKcy+CtiMV9A09qAkZnFMz7f47WBD6ALhev/P68GXNN/WtB46QxNoxjQ\nQWCEa9D6cawfIuX73agOxX6F1NnbnSQjXt9HiMKsQYZ5bceGhYtf3lcVDT1s\ngHvENcR8ASLgGHj5qxxwjo4FTQKlj2ERI5FmiLWGfKMmQJ5Q/BYngTjBDqWT\n4aAffISkNAg8quU+9kY2hFrqX/rWfK9PDmFqycx+Rdhc52wUcD/ZvprlPULj\ngiqep8bOx7HsfPQLDTGF43/GDs+QkSXmR0sIkItfeG0Udppau1i0jPjnUxdK\n5SlsWa6VfE9y2vvYo5EtNd5eDZ07TwyKSEJ0bMpAKVfeFc8SN1LkJXe1LHiN\nV+1X\r\n=EgTU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKWejF6IroKwPwoCr7HWovAuEFLvsJ5DtMr/i4Y4mwqwIgPrCXCMNl6NllHCy5gWY6ju9mWDrtMTZNXEfC99g7NEQ="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.2_1630545120154_0.8294069623638949"},"_hasShrinkwrap":false},"1.0.3":{"name":"nests","version":"1.0.3","description":"Simple stores with a lot of control.","main":"./lib/index.js","scripts":{"build":"tsc","test":"node ./test.js"},"keywords":[],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"gitHead":"a2e6f726d65d9b6616b6119ac933ab4e98c9873a","_id":"nests@1.0.3","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-IyEEjX0tqPUXwXmHNt4hjZRLwA9YaRVb8EKAotVbXoB/80gd12/jUrMIEWr09edEL0UEfmyJRpp17jIrzNroYw==","shasum":"52e0b122e60d900af8ac07459c5c8b293355f1d3","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.3.tgz","fileCount":9,"unpackedSize":12790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMCdCCRA9TVsSAnZWagAA46cP/1voZS9YxXW3iL0csuM0\n5IsoHRfICLU0EH0r67U0ZDnfRMx83l0dZMiLVaC9RZ42kU+ofP+/1h0pFOUW\ncs0DgXBauSmypvNrGahllVtMDexPqJSfAJ59Az5KLauWlMaaXYIrqcNgWqc8\nIqgQBj46A1mqV0Pu0qf857nwNb4ilJg1LQXI9UCBnfv+rsXPFs3qSY6c9XxQ\niMJwhIXsETbpe7E0LHfMPvPTWs4GXyxtum1GAUvFEIZruH1+qa08Yx1ebFO3\nZCxz+EXo6GxuRdcVL8pvsscUU1VoXAWWw7w7809+m+Rxx3IfT1j55OZ0XoA/\nL65BYAauHXKLKoN6VyIEXTK0r/SDZF9tl3ELt0r9Yv0162Tzz23nl8OYUYqr\n+blyv+EPjI+f/IuirIUAGVZYL7v8hhAvahzmBGlLFqZCqvpHFDfsjvSrauNp\nhsSr5Sc6iQqFe+r7pezU8Phio6iFpGDP12vvIPN8FNcbmb72IEnwurJgtGwC\n9ZbcsJkDm5pckgFOGtYnJjFRCG5N7NAIQZbj3TmfzIkgWGaBSIyAlsbcvokB\nU6hmWrGBrGt3NBi3XqNN7VHVT7bYT6srzaqXk0NgKI3YJWgRXG6mUG2j8FIp\nCM9zPTF+w8AILbL+/poJoOyksNYJnWlfirNH1HJ60iYWnY5zb5BHRYnS/ZJz\na1pA\r\n=gY6L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKporlb8UaqMb3q0yN3A/6HUBQ5sDmaCpoAdp+hgI/iQIgX3/bNKFVXjyRs4Tzf6iPoJ0tarRIh+6mzUlDichx6tE="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.3_1630545730122_0.32955670641228396"},"_hasShrinkwrap":false},"1.0.4":{"name":"nests","version":"1.0.4","description":"Simple stores with a lot of control.","main":"./lib/index.js","scripts":{"build":"tsc","test":"node ./test.js"},"keywords":["flux","redux","nests","state","simple","predictable","easy","deep"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"gitHead":"a23a60de1306430456480ebc0fb51f0855544be6","_id":"nests@1.0.4","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-N6e2pcJO4tvYn1aueZFqOCcWMJY/tswTj5NkaLA6nzcJgP8rVKYc24bd7cUmpCHJArm7auap7F0U9EQ7Q5Ok7Q==","shasum":"1200b30fdfc3d343083e736e8e4308425494283a","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.4.tgz","fileCount":9,"unpackedSize":12832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMCmUCRA9TVsSAnZWagAAHgwQAIALCXLBeuMthoTykcYT\n0gPvCaAeAnifcrZ01cDy/XKpWqJWJ6IdAWpAh1inAj0CI3z8gt2usXnkyNXA\nyJDIqG1Zm/uL76pThR2uszwTEeodxBTOm/Cg3yVmcEkqezM1Sr5ZJ1Rdf/Su\nz6damACZXtrdDwni8ChT3tzUVTJQhb6G86Q5/kZjYYqC8ezyWutFOo6VttKE\n1UDry5YrBzxXybJTz2kAlkhV9WeEYT+KNMnbuiJRZstxG6Immq6QvyZVwkGj\nIvsOfWLJZ5ZSNPR5c+fboa29AC79nFw+Yl5MotFh1ECE9tX5jGeeuhgA4q0s\nh83yd6ATDWYrgEG3kiC178M1JEzHjoZbECApdN4EV4zN9/+kZ6tn7TMnumQ/\nxtvpf9yjVAr1e/9p1cvhQsq2Ny2/onWaqPwCIqY69EY9Bnuh3OFTHeHX8iZm\njriDweOQZWXkuD8fouoZd1guxiw70ayRbaPZushfYuCW46JaCylRs6ba/dKV\n7PTiHDoqptjoLhNFPBg8Wny83VQsmQiNSQo692HrnoXG1AVm+XIoz8tyoe7H\n0wXzyOkfadDtgcycX4XIgE0ZJ3Hab3Ds70pvIrtLAUtV9z+l1c+nH6/g5/qp\nihvcMh+QmTTO6yxmL3wwiZcnjyTduEzHDQifx8F9XLHLIWwvOjxozp4geJN1\ntq17\r\n=wKRg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCChsj1ppWz9ursXjJBQZ45PBw/+SZzGjG/7PZWt2I0pAIhAMc/rw+MNMDtVWCpv4nbiIbY4yU++ms+RFamngCP7UXh"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.4_1630546324207_0.6296668757018626"},"_hasShrinkwrap":false},"1.0.5":{"name":"nests","version":"1.0.5","description":"Easy state storage with a lot of control.","main":"./lib/index.js","scripts":{"build":"tsc","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","simple","predictable","easy","deep"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"gitHead":"8f0e98dcc0cdcc5084f5740bc434b02c17500264","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@1.0.5","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-cym0mLvHFIszbESAgxTVrGYwrB6JLTIEMeKVvEKm1BamTlfyv703apxU0q/WcKjfRKaxK1cGH7/cIp/KDWcg+w==","shasum":"0aed42bc47b7647a061595c113f2951e49b0b31c","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.5.tgz","fileCount":9,"unpackedSize":13442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMDq6CRA9TVsSAnZWagAACVwP/RWEgzupIiVfu0y1SHVK\noOtLZEs8s7U/cZn1Z0ed1MJodkyKwtdZiRQ6Jb5qzeRZfotZT3sS+CUwNqSm\nD7kwKBcq4Su7p94jyErca6qeDpLZFGKCrDWlHL1dQtPRevkmVXOeaFqy1wZn\n5CeAtZ8x5xtP9u8DvydeTNNt38M0ZLleF+0ghOTfUggvN8u+NrTxgiUy0HaL\n84Is21Atqx2S0FADIGplc0Ul7GFyeKzjlqJoSU35CWnkPLNr1J/szMRK+wmD\nTdzE0TeakWaP4IqgNm7A8zp8KjZ/78zHH4YlTvPNu/J6onPWCgX+FuqyblmQ\nQGdypjtQr5ehq0IrL14YRZwwB2rVbF45wq1E9YVUnPi3+OvFJYiB6gsqx5aS\nQSu6qm/9Hqs9yIzh1F1PXfg9ZPlKHYTWJ4WNWuE6ny5mS+rkVbqEHLqYCDHe\nJCq6wE/DxlwioSlCSJU/Ljd7dc3ZTJpYgM0eu8tY+9veS74eejkjfgPkJjFc\nKyTZf5jpyTJSbThFR3RlK8zkInXtbyuz38hdksPjbM90Qz6sHzSVtvdJQYRC\nXqwn195Fa/dtnlbIknsZxrt5Z/W5R6xmL0TIn1N5GcZ4IL6ObE/iTm+VMrT6\ngtRWYLumXi+xHGKsbwHMsiIOwOwf9lsjospk9U4qt5TooZ9GQ/EUzPVnioRX\nb8QH\r\n=Cfey\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtO0skHfux+P4xAxBhvH91wyELgWymIvwTtpwXfDsqrAIhAJOna+H12gPofT+8rIIfAn8nnARgvzBZ9LHlG/ITEOg5"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.5_1630550713981_0.5762060317186704"},"_hasShrinkwrap":false},"1.0.6":{"name":"nests","version":"1.0.6","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","repository":"github:Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","simple","predictable","easy","deep"],"author":"Kyza","license":"MIT","devDependencies":{"typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json","test":"node ./test.js"},"_id":"nests@1.0.6","_integrity":"sha512-ktOCeU+dg8d4bbh8bXanfPeLQ/e0nrmU02MGE9JROjqwjWOV7351olZp1z8daLfHiSj1doXQifwM6EIWDllOmw==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.0.6.tgz","_from":"file:nests-1.0.6.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-ktOCeU+dg8d4bbh8bXanfPeLQ/e0nrmU02MGE9JROjqwjWOV7351olZp1z8daLfHiSj1doXQifwM6EIWDllOmw==","shasum":"4d02157bd63f1460ed1be1dcb585ec005d27cbe1","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.6.tgz","fileCount":15,"unpackedSize":20513,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMSgPCRA9TVsSAnZWagAAEK8P/RfQIKGeau+TVOkX/9DF\n7xv4iPH5V5gi4nQz5514vOvq0DQadgWHP2nRJD/kj94TYqfQ9FM4+T9W2PEX\nqrXL69gB0KAf2xK8+1KC03KreXjJTXoZm36Io6X/e2NnF3HPdkfF0/klpajb\n3JkU8d6Wh532RrUjoFcEbRboVx0GUG0R823+XDjU6nhKhK6YjbbiyAPYmY8a\nLYco/ivnH2/Tkpdcok3reeDU6oby3RBl9tRJhYgAYTdRMmCoTAX4rQMbOI+a\nFGkIBREJFEcsiCwMseJve3jFrje/oHHCBsewUiwOgXqYahSdC8SF1x4HT+XU\niRJmImFArBZgnSb3pkW7pUBhCW4nCIHU/x/MxMxFe3mmkXl7FmpFnMBxlVJe\nDElwqrdPBFZAm4jgJRhXSZ46IRBnLqOS0RbybfSUG6Vx50nIqTMmqCkZ92tx\nBqqMY4qhQd7ZvvCwWr26wpXmG/Dc+5dJtMmM5hR2KENjVif1LymQd/X9FIso\ngR+H2Jw0rHdn3Gf17o8FfpV8dfpqmuJrGTOTV8XXQkbvA7lQIayN2+8gsWbo\n448h+BB05aG5B+7lqp+VhtKAsty0s2sub6MxwB+e7HIG2UVWWivY6HrsHNSY\njR3qQrKTCmnM6dibMec4yV+l+g6IFEHfAcHGPksWfrxrPXzOMQyQBm65e58X\nV3Xb\r\n=8DeZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHkxqKp/0boO6ruIDhArujK6sGS6AKUHnQQ1X8PHBmLwIgdHkElFP9xY9Iy3BGknawNz7oo10sn+5p7+J7Yp6RGwY="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.6_1630611471294_0.7754778966533966"},"_hasShrinkwrap":false},"1.0.7":{"name":"nests","version":"1.0.7","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","sideEffects":false,"repository":"github:Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","simple","predictable","easy","deep"],"author":"Kyza","license":"MIT","devDependencies":{"typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json","test":"node ./test.js"},"_id":"nests@1.0.7","_integrity":"sha512-qm9amOJqJiLezbaYX+hkbTy5nBXyH+Oyt8x1HunawiclwU5mDy1iPNX1gYLfKERl3urpAMbUTtzNcBLVu1k63g==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.0.7.tgz","_from":"file:nests-1.0.7.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-qm9amOJqJiLezbaYX+hkbTy5nBXyH+Oyt8x1HunawiclwU5mDy1iPNX1gYLfKERl3urpAMbUTtzNcBLVu1k63g==","shasum":"cf11a93888f1c065b9ce20d6964835163fa18023","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.7.tgz","fileCount":15,"unpackedSize":20537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMSyICRA9TVsSAnZWagAAAVYP/1zFmA55PIceFH9PjH8X\nvPXxOUOn0sbbIaxREPpFIYeJ0X0dptyhVcCJ7I4X64GR0YXffT4uJK9k7L3H\np5VVcwWmE+Maz7gw320FLapDZ2eObsUFO5+P/agrsUoyirbYLNGaNsyokmHx\nzH9IdGwxinMhrTVI+MuCDfHJaxj7GMJeLnt5HQ0KRHUVx0XQhxO1xhjqutnK\nJJdl6Fx2FKluYQNQyMcWixnie7why9CuuztzcQ7OqAKdACywCeSNykkbDCqy\nuL3TjHQKPOtmbkpimwqvB9V6GMz6NKww+PLAqwPs0ZHfCT8hfK7B/XlFw1P5\n529R3hDp+gz6eXdo434pT7irV2ejQ5hz3Pm5XOk9YYUtJywmWFfIRO8KTpvx\npQmFF+/8BwlLLSpOfPD4lZG/gTZ5GYzuomdYIXo5f8k5qdf5dlTvqPU5neaa\nX+OQorloXZ1sMSH83XX5O8vH4akMGdZuIjBI98htC9h/rJ9eyFa/TWzInBZV\nQGGLOqIF9s2idxTpeDUrUgYss5660PqKfu7rLaL7u2knlumtDWlQUyrXhzAJ\niT1euMiRJZCoyVdFowVpZyjrIjoZ/V2OtbJArmxNgJYBpGkul7LOvx98SwfF\nLoIv5MIpkaZAd/1hpDtyrYsqwcKeQed3wc++0HSzHMJnaxK+A7sJy1w1HMig\nQmpq\r\n=i+tP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDuFU+iWgjYjEz5hhnbOEF9KNhDORxd+WsJJX9+b2BvcAiEAsU2nhkAXxYp3D6x+cftTewOy5d37o+1pB+lNd82A120="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.7_1630612615978_0.15979455002006704"},"_hasShrinkwrap":false},"1.0.8":{"name":"nests","version":"1.0.8","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","sideEffects":false,"repository":"github:Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","simple","predictable","easy","deep"],"author":"Kyza","license":"MIT","devDependencies":{"typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json","test":"node ./test.js"},"_id":"nests@1.0.8","_integrity":"sha512-t7ST1RjyLMBiVjBd7tV++kCVEUI86FAZ7ey6+xNZOEf3lOJf3yNwAC0QvND86wD5AaSWIGuIzQlA5O5i8ESpdg==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.0.8.tgz","_from":"file:nests-1.0.8.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-t7ST1RjyLMBiVjBd7tV++kCVEUI86FAZ7ey6+xNZOEf3lOJf3yNwAC0QvND86wD5AaSWIGuIzQlA5O5i8ESpdg==","shasum":"87150e157b12bac21947fe8e01a120cc31905a81","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.8.tgz","fileCount":15,"unpackedSize":21873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMUPXCRA9TVsSAnZWagAAeqAP+wYNcTcX5oC2OWMRC6cD\nWiuVST2+v3Mc7/52J8eNiFEU8MpcqshFl4VnT0O7xsDiXWiityiNXKbDlI4M\nALFDdc6ZWHLb1NTmWs6sb1gz49wrwMV0mygAAzeb5zQ1vVI/vlEH6y3E84oQ\nX3CdgE0X3+32OzkEVBHnrpZnZfUcOVVHZSG0zAOsUJgimwf2u2zJVOkzD5ZB\n0d8J3UkFI8vc4mXa2T1otV48el9u3oX9K9sTBgN9YmIVAf8Ferp6TafJaNju\nSp5BJNKfF94E6vJky5CTOAfNImwdywpDXPWmES4HFRepV5y6HINpab4D1jek\nTzGdeDAuAKUzsYYr4FroStRbKIz2vh0MmUJqOPWIE/u0iVbkb5795DxoYeEf\nVNVYLYRE+ndQcFXmNWyvptbTCUJmWxOw0en2qoVUQC+uVHTtvydGiXG6gJed\nwzCHsE9UH04ze59T7/h5cyBzWk/963kTrXAjpgOuuaVh99B2ob2ll++OqMVM\na7vURiliVDxhLxNhkIHj7/++V+xAEOLMJlBaMT91LeDJhcxM/ST82vlHYHOb\npYo1TeOoPYnQ1V43c3NnoyLGsyrm+0AjIEkqnIUxAduW9MBA8PYHIr9SsdN+\n0W6wt6kb+7/6VP8AoH6JEDVcgDDcTHUo/v/PeyPvxZPIYcYExsECPIjmFImY\npsd3\r\n=K/PL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG7jCNgMdMyj3CXKallvAGtHoj7ZAeGIawss7hPySEc9AiEA90NJy8xq3bYTcTnOLeCsxK4RoJ6hgIXhHyW38pVt0YI="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.8_1630618583361_0.15816711608155254"},"_hasShrinkwrap":false},"1.0.9":{"name":"nests","version":"1.0.9","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","sideEffects":false,"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","simple","predictable","easy","deep"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"gitHead":"e3c3b8387f3fe6af8e3e1e54b34fac44316982d7","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@1.0.9","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-j5fsN8r5Q2tZ8AhzP9v8SQ1WwrSDBFdH5Dx6RXxt7euyAfP/rRYNXmir9xZdwsq5er8+TeCs/4G4rP/LR1kgeQ==","shasum":"b3ba5dd72db13cc8dd4f98f4269b4434001ae7c3","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.9.tgz","fileCount":15,"unpackedSize":21738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMURvCRA9TVsSAnZWagAAucEP/1Fk2Y9uLeskYbnI3y7z\n3ZyN+w9jFBUIYhZA0ynkKm++Jkuca2wL6qoOOjUWh11bG3wUn8kTMg+I4RGU\nvsLeywSQysAtd7r82CipjVfxZHWoY7SXZfnk2rIz/vx+snj3N5CQN7DiZNDb\nt1Fs0rpLgft49dhTaQa4D6NeoBBarNl9MZZLKoUExGQ7FIjsJyjHbVL8L8B1\n98UplbNi0pj9j1dVCZXG0Gwy8hvbbmTK+gt/TByXAt4Ttupjn5JXWKRnB4Uu\ndRfDguf5DBscysjtREhLiDneD9ZAR5bLjNNxMYHGmhsvfnKMMdmPgZpDhR7G\n1iz4KqEHzofzXNBBGP+/ndhnFy0xjMvXkJEkmF0zCD3Apx6Ki/AVHS3sHjFR\nECOxTYo7vJPgUGynqjEnpqxSKirLQ1awYb+VRFbk6Ul23CnJigVTMFtfmiiH\nkfVcjiLvcepaMl/K6jPwCzdLZUdXbrff4iM3+BpcCo3mIBFhPLHCp04QnVNe\nmeS9Pes7GJxFnvrUp31HCen5eGMCAmvhChW70LeRndAAV7MHOpbEtIV/XbtY\nGmDUenf9ZZaWnUy9XaNBJiQ+VDU2CbqbCV41bzcplWdwZehb+Xrh0HJqmqp0\n6HOAPVUZVvuTRJWsX90zAmGeUCXTiF4VWWEQpmW+FcxzS2n1Lqxk9vlM1JXZ\nnKp5\r\n=3QTN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB3b11JLTGFOreZfim7UprYAbXqMcfkfsURMCT2M6K9JAiBd2O5ojtCwOxPnzvvJluKTTBl7eFCtqN59Kv4zHU786Q=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.9_1630618735114_0.7469677742216534"},"_hasShrinkwrap":false},"1.0.10":{"name":"nests","version":"1.0.10","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","sideEffects":false,"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","simple","predictable","easy","deep"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"typescript":"^4.4.2"},"dependencies":{"proxy-deep":"^3.1.0"},"gitHead":"6cb710453166b64d7ffcd9f1e9bca91405480163","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@1.0.10","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-ZV4TzYjWahh2q1e/1TrkWv+1ZudHwR8s2a9wq3RSp4EYl++GYO9afl5UNWUB9e0qAni/e37fdghNwJ60AH3N6A==","shasum":"be6bd3c1a8037bc0b2f2238618af8bf1846b0288","tarball":"https://registry.npmjs.org/nests/-/nests-1.0.10.tgz","fileCount":15,"unpackedSize":21771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMUXCCRA9TVsSAnZWagAAxiMP/1IhhLps3Ty4PaLjNLSx\n2rg2qis1Xsxmt6k0cm6f1+rYABFjUeqiVURsjID6PKF9cE2cfWmNmjBdOx6y\nMKWHLaERiqAR5fdPe7cKtDCMawdcpPFYz4m4Y4C9OO1eTzph0mlk/+2MefKX\n+roB710rHvFl6sD5EQLp4NrIq89BDOLAjRZvaNxuvVJjO369FRlv9eWqItdv\nUPtBDRUP0XYRYzA14eYfj43GF5p4gJ8+24bBuF4iJnmGYYdTvfe+tLgfOdp/\nrzHy2EhnM9NMTGNWctEYyeBHU/U4IZGQuXMe7vA5ppPyTqSB8wjLHpOF0kCv\nZkwSteT0jX+blkmqDG+h8+M5sYrW/jTlUNI2Ooim+SMb563MHZfMqsw0buKv\nQxkJQCOY5fkfLV2We9pEZobEfdVSDtk4vMC0oFPwkYzknPJImjnRqNlmExyG\nkKzKQqcEnDIg+HvtOUPkhuVIpi+lkaeqyd2lvOLk+7DiEA/K7PKwnedmibV+\n+3PfepNQaGVahMec2NUZZGu9rKKJpT3OEUKBmr0bzsrLu1wf6v/WMUO8JPfZ\nBBJ7bqYv4q0orL6XYWhihUfvVBicad+9yTiStxHhBTFghtHgbjVHNb6HjnQO\nU6BJTXT9jHrNYBlCSp8JcIqU43zJ4bL2sP2s/WVOKeUsRqqz12cU16hi2W4/\niNyf\r\n=+hJF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLy8MEr41Co8TofQbwXgqvFhru4i2/5vXotHXHtuj4YgIgdp6+T2OfRRf66VPRtKCC90H1/ZH6Xg14oFhcJN1QmRw="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.0.10_1630619073935_0.7640547520759651"},"_hasShrinkwrap":false},"1.1.0":{"name":"nests","version":"1.1.0","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"github:Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@types/react":"^17.0.19","@types/react-dom":"^17.0.9","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","test":"node ./test.js"},"_id":"nests@1.1.0","_integrity":"sha512-ns015+6VZVNxG4Y78lCJuvuB+zJJq5EIlaQFEpkdtRKTyFNIoDs6chWqbZlN3ePuPzQRainGL2TTnPR0e12dQg==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.1.0.tgz","_from":"file:nests-1.1.0.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-ns015+6VZVNxG4Y78lCJuvuB+zJJq5EIlaQFEpkdtRKTyFNIoDs6chWqbZlN3ePuPzQRainGL2TTnPR0e12dQg==","shasum":"420991ce6c57d579fe5ccbf1033cdc0771aeb0f4","tarball":"https://registry.npmjs.org/nests/-/nests-1.1.0.tgz","fileCount":30,"unpackedSize":27536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMkXoCRA9TVsSAnZWagAAapsP/2Z212NP4gpexBWH4eMR\nohQCtYZO7x3GpAWMfcuFM7JW3JedGnUKrrfLqJaitmFQNtt2vgTCg2DHmuMo\nRjJFgKR1NAETIiDvnr6Xl0AHSdrGu8Tvo2y6QYoS3RmKeYGm4OL7cz4FtvsM\nH3yGc3mVBovyEgji10nv6OxPDDtqZhKuaLPPC92VZ4XqsNxGUqvIEbFH6adL\nvFDujsA3HpbjDsIQ2ZZzQYUB5kDby6Y667J9Y5P0M7Qq2l+Xd4Mcj/8ORfin\nnp96hlFMeFxuwl+PV9fZ863AHgdelQB2Nv6ZOjZ+Rs/B7Qyoe/IAR40nSG0Q\nfKkGHHXAhrXSBiwKFfjXf70xPp+jIP1yjOIeF77GO7ZlWH7HWG3OPxaNJLPa\nTnKuZmLB0uo1pfTHRXsgMHZBHhSVoGpTsHQobZBURejF+XA9WQHeCC+wKP5P\nj64vdg2wr3LZ6fmAaTcNQuWl7h1nM9fi/C52S+fFutdIVrF1htGxf9iY/c2E\n/vmq+6Of8S22M7Sbf8JwcmY6KUzCYrzlLa34JSMs1ijc6vDJxBCLDNwnIDAS\nCWMwtoHMUxycyxXCTOudaJQ4BFDI21AmmiXLZwb1ZoIduJ0BXW5tHJV5hkFH\nPGcMr98h0A4YUKC/euuF0XziSZCrr/cu2Z3xf9fqO4VHBTnXmQ5Q+oi9UYgA\nM7bE\r\n=/Ym9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG11073nfSw/zhrYTXCV5UjoY6jUSr0JFqI05cdM507DAiAPmQuJzHinojXFmlbtrUmnsQLAGOa7vNPNBe1H7IVpaw=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.1.0_1630684648244_0.6128832343957875"},"_hasShrinkwrap":false},"1.1.1":{"name":"nests","version":"1.1.1","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"github:Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@types/react":"^17.0.19","@types/react-dom":"^17.0.9","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","test":"node ./test.js"},"_id":"nests@1.1.1","_integrity":"sha512-B2qZ+CYnM1R2/FWuqW0tBVTHekpyovIkwBKRLqF1deUHuQ0lygMisjdGtoPM2GP7X9QtXCCyb1njNR4Ynmh0/Q==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.1.1.tgz","_from":"file:nests-1.1.1.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-B2qZ+CYnM1R2/FWuqW0tBVTHekpyovIkwBKRLqF1deUHuQ0lygMisjdGtoPM2GP7X9QtXCCyb1njNR4Ynmh0/Q==","shasum":"06e0916a5a10f1ad2aed2bd13d5eb3c47254b566","tarball":"https://registry.npmjs.org/nests/-/nests-1.1.1.tgz","fileCount":30,"unpackedSize":27588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMkdKCRA9TVsSAnZWagAAGqoP/i4cg5bXxzvStr1keohx\n24xqXd42vOp9DsTVkKfO25t63T9O3cbZSaKB8SbC4GIwmO1eUhUBTDG2ZKoN\n2j5zGVS5b/VAI/0khDFFmsrS/z325xGeS2a64vCWaVtJ9CckM2qQ+sBfVLpX\n7pCLjysy5+mFxGLDVidND2uHGqr8O7b1VISy1vubgJiy0nfbG2Vw76vQjP2a\np5tW1enP//iVWhkx+X/gByKigS9kPTAsE6EtQyNZOYuiTUkpj7IqmEx9i2t5\nH96yE61ltfAyzbmwU2eE39CKj7s6wxhyzlYzyof22V8lRm/ssYkPqQq0QEhl\nbXJSq1w9n23l2LBIEwg2CGJT0nphb4WWcptPidBWJm/FK1cX3GF6UR9eE1Od\nyKpLLZERH04956CaR20bAoYdeGjlMqZ/WjlXHrhwnHDUmj32ZyD4biWnBHmn\nY52e4nzoF2Hm3MOt5AtF1piNFZ2MLW9KTTbLGze0affPsiVoba9aTpmUtqbi\ncVTzjVPFqWGiJxh6ukjBZWzTbKEVhyzmWR866WbnSJAvkaaZ6rlMrZNNWO8t\niwR1tVbnS6C5jwfDD3swqJCXi8ccxSqPrT9opoPnfR1UXsiqTMFYwz8kYU8y\nL5AZq/IMNMwZWsN8HyxfPFXt/ICv1nGO41Dd2/k3rHVMPwX78J0o1mnsXc2z\nzuY2\r\n=WvrK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAurD5mCj2jZ+KFvuHtWSk/GXrANT0pyh0IhwuxrOJo4AiATeIaa+ob9nAW2GnAlDCgnNib7L2VImXNCMpHfO9yXSA=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.1.1_1630685002775_0.6358923500462692"},"_hasShrinkwrap":false},"1.1.2":{"name":"nests","version":"1.1.2","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"https://github.com/Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@types/react":"^17.0.19","@types/react-dom":"^17.0.9","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","test":"node ./test.js"},"_id":"nests@1.1.2","_integrity":"sha512-l9/RZba4Pv1iUhlgBwKLztMFCydxqZjOGCCVx5iiV8M2QbgXiTENdEsLG0FVljdzX2oi4EM3LVBjdffYh3KDXQ==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.1.2.tgz","_from":"file:nests-1.1.2.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-l9/RZba4Pv1iUhlgBwKLztMFCydxqZjOGCCVx5iiV8M2QbgXiTENdEsLG0FVljdzX2oi4EM3LVBjdffYh3KDXQ==","shasum":"bd21a7c8590fec3ccc05604bca58b1bc17af6ea3","tarball":"https://registry.npmjs.org/nests/-/nests-1.1.2.tgz","fileCount":30,"unpackedSize":27571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMwAdCRA9TVsSAnZWagAAQ1wP/A+E1x9q1lI3tOwinvkN\nTkGJ1ZRV1Kttjh0ZjfSlomWUkKdwGzrpNQP2ulhyJX9YpFWpKSQCKOzQD+8W\nme+WqWYVJid8joUod39phIICfHsL4ozrrcQ6ye1sKDR85E2M/DdRL5RVhfVT\nyVAcOmuRd1qgm3u2T3QalOaVfvFC5ilCaHB4SKg0/XCOZiJQlAsgv48oLnjg\n9IJ/Iha6UaX5rnTPzYNSll6YwXP9xUmAsoIJRT8e2uyjyNgXn0Losqrzi/Fp\nOGDms292X5j0cEnd9koNA15nnFPmb6Rre99CUqxTT2gAHXQTIFEoTVFbk9Xt\nCdRRgiASJ6vfkn7L0nQUXeAUZEwT6vPjJQjBZTp92OWLoWb/qVzrawH3xGQq\nSt1YBbDh+xYgviOugDYTHhfBHbKZbJNuiJhqoP6NUeLGzPBfSk/av4hW6ac/\n/V3dEEhaKdevLgqE8brV33rKYWJW3mD3SYsjIwrBHCWW4DcjoiUYkDl95B1e\n2MpncnavhrNJy1YA82t+zA6JA/w93kPqAcYrCAdwDY8olpU9I6FvZLET2A+i\n5rjHJtPTX14f6jS00R3i7TdVZtqykLCJXyxsKKC69szC8pV+gfGeuSqgkgAS\nYz5U90fr+fXLPiACILwM+VJn6cUEYzT7CceEd/Aw1TzmqHww7ZRiSjQXgXbp\nHAQJ\r\n=C/fa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwFuHvHCEkBKnlsEggL4rt/v5wT1BxnBIIbgBA9IKFwQIgZJwhZM57PG9h/Tu5yf9zoG/gQOCMoSBD+aYBJECsCM8="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.1.2_1630732317814_0.08008876375142626"},"_hasShrinkwrap":false},"1.1.3":{"name":"nests","version":"1.1.3","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"https://github.com/Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@1.1.3","_integrity":"sha512-U0sZiJBQPDlMjKjY4PCku7LjUXYjx/bsZ52CrbTzIWoN7QpjRWjomTf+DgY/d7mL9co5AFFz+FVCvlCL6T9AIQ==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.1.3.tgz","_from":"file:nests-1.1.3.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-U0sZiJBQPDlMjKjY4PCku7LjUXYjx/bsZ52CrbTzIWoN7QpjRWjomTf+DgY/d7mL9co5AFFz+FVCvlCL6T9AIQ==","shasum":"a5de02991aa44d69b327f83a47b9253b8e10aa00","tarball":"https://registry.npmjs.org/nests/-/nests-1.1.3.tgz","fileCount":30,"unpackedSize":28545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNHBcCRA9TVsSAnZWagAAB3MQAJEhy2o32kTHm5yJMU68\nmbPmVvwQcz9mSgk+XJ1ghny6DsTBGwtmj8BkKmVFPVWCyjRNjMuLiS0AszNV\nwwIsbcYbSXA3ENAaiF2R4xKiD3jclyQCR9FAWadn38BDLDobyxcg6Le0CpBD\nCBylDE39t9SoLOuanKfCnNu0h50BusfZ4TzbxUpeYhcaEX9rqZ0+4oqkV00o\nUpgwaHwenD83jAb90c5R2EhZXUZgMD0MBLdl3ZoamH7OldyKD1RLpW2s6QOW\noxFxcmbN7V+jnw5edTL7BQO/1cJFaTGwur+MQppKMajK0dZoz7k8HRfGezBl\nZurGpNUR4K4h+fkzuieMcYZLvneCYvd19w8u38a1BdNJCge7c1GoViQIdIyr\nltga410ezbRelMeZEJlA6Us/ESnx4+WLxHTM49hZOLdbPFiaGEUSNaoAdw4K\n0yCIata7BnVmPq8KuXjg+AiJsHpVfViDZeZmtbNVYcZjWTgWa8g+9kDZCX9Q\n/He8N+L2d+OyBKaAZJmolQmQBLke2qXVvFrCgvYYGlwFTy3X9Zq/vyJi7iW3\nMixaXMkvGDU6s0dfeYlt6xOFRbwQts2PSypuFYeQCm52E4tSdwvwG8eLx6Wx\n//5ZZHxX38G9H5sx35QXzUyQORuTYEyvzhKwNqxhmyFb7BJ3Tz40k5IeHFbx\n9QON\r\n=53Ht\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8knD3sudhxIvzEPc0Zru5RQGzu2bb9cJF7tiwhz4itAiBcr5CezG/GSxv6xRAzenZBbu9pU3qV4JfS5x0pkhnwJg=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.1.3_1630826588354_0.6540364538271035"},"_hasShrinkwrap":false},"1.1.4":{"name":"nests","version":"1.1.4","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"https://github.com/Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@1.1.4","_integrity":"sha512-MqDw9fqv/dCZsl/mGfCYqCaCOx0yNUxKjBqdPcUvcTPiEk4dZFAcNfd5284pwHzzJ/mTRDmGjXjJaHW5ZoqUdA==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.1.4.tgz","_from":"file:nests-1.1.4.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-MqDw9fqv/dCZsl/mGfCYqCaCOx0yNUxKjBqdPcUvcTPiEk4dZFAcNfd5284pwHzzJ/mTRDmGjXjJaHW5ZoqUdA==","shasum":"935e39bfa74b115911c9e76db061bbb71630707f","tarball":"https://registry.npmjs.org/nests/-/nests-1.1.4.tgz","fileCount":30,"unpackedSize":28522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNHI8CRA9TVsSAnZWagAAlroQAJ0NPTaWaF4xFhnCFOQ4\nnqZlU6rCoTqRUE1amD2CEXcBgS3oVCvXLNVPEF5l18fKqugQqRSkuDsDBXFJ\nz5GWIWlRvUQSJghzVAQm+ud1Ge+fjX3MlNB4wTOqeWIJa6YQO2I75oYIAb8l\nJYwuHRkvUmSd+zj6/oyGW6gKv/rQ9M4GhAtDDdfvWsYCeiDjLzjJbAp5novw\nwMQm7UOEulIwxMVhifHe05hpr9dsfo1HzqX3MuGr3hXgn+MNtkjCvghRfNUn\nP+BCosxndvELlJqtBYH9eVptU1ijfbh9VL4v3Ze9RsOnHxd1+wc3PSD7l7EI\nar576l3cPZ0tdfxF75s58HzwAhvUUpa0HeJ5yF8Tw2/PZpUjEhuY5diWO+dx\nsH2hIWSCS6k8463fFwosikuNcHAliS2uO5psbuDvBxn5cJmxf6/P3Lvn5iW8\nFd7DTU6or5ARjuHQavlhQkdX7CskhoXUKZVECjdClBrtVHlLs2VPmFU8lVXl\nDHYAXgzF+BI60Z9n9b4cFJfIecbcDDT9NXJzCd9LxxlceRyiq/cKic0wl7Lg\nXyO1BWoNlhR5/+u9Tfd/h9CYGhSXepZzcgqXdDOVSCpe8zVBKB4lcDjxRo+i\nf76H0h9DYaMXLvAoc0pKWnbfWedQCPJCXfeIntiY2LX5IoMyle0ojbd8C7hJ\nkNQ4\r\n=lG+M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHxh1anfSfBl9Ota3Cd8lf+t/iUOaIs7zfb6E+CE1a4zAiEA4eN6Clepxg1UUUZZkvlfH+PUxxuOeJwixs00wRnCvBk="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.1.4_1630827068801_0.34627813229323934"},"_hasShrinkwrap":false},"1.1.5":{"name":"nests","version":"1.1.5","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"https://github.com/Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@1.1.5","_integrity":"sha512-oxzd+SFu+Jbh9TaMGXLZTP/imONvPfH135HOmTQY34RhG2aN822+nTepjJJ7WN4Ln7sTt3Z+lzMXdr89D0M1iQ==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.1.5.tgz","_from":"file:nests-1.1.5.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-oxzd+SFu+Jbh9TaMGXLZTP/imONvPfH135HOmTQY34RhG2aN822+nTepjJJ7WN4Ln7sTt3Z+lzMXdr89D0M1iQ==","shasum":"22b8ee3015ad04332706ea07d64adc83ec90acde","tarball":"https://registry.npmjs.org/nests/-/nests-1.1.5.tgz","fileCount":30,"unpackedSize":28261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNHvtCRA9TVsSAnZWagAA2X4P+QAC5se4Iuc3vFnRMxLD\nAfnyvobdiHwVyBBpkGVTnmEHt9NFg5z1hd8U3cd17CmO2Zjw8f2HAKM0o25t\nFjSVp92XogvP8uxuDIkPrBQJq7lRZJIYjgzWZEjWk9xLYhl5GUihlYWmpGnq\n8KDSJ+mqHApM1lXkfGoE3ts+Is7gIMJioYCAWweoiaB/1q1v4ucMNdQflXLC\nabCfuarsRjMwYLe4OOEdwJzKPWd9MMkmbnkb/+qJ19LazmFjbIKISbU2e8SR\nxGJEPHsRfc8WqwhnLQ8L6OiCy729YNjcbOtS6XBHFpnK4uodigt4/dZRdJ5J\n7ljZFM+vhEBxAA/XvqHLTnU0xVo6MGOyrgJnOAGdN/ClZBUWBxWB/3WBsZps\nAN3bRn8nvvK7cobUtqKDbj1+chJf9f2x7cvd7JAyd0K1EW816PY0Ajsp0U3G\nwrOUPiZJ6eE+VRNdAvgfM9V3ajpDHfli067TTMlo4Bwa60aGtq5jjqBXPvUV\nQ/Vls7iYQnLoeQpX5S/vJNTusFjGFlhbdBqrI++k1zJXOufJnhpmDchKnO7y\nZ8HotrAADSTUmZWq4enC2oayAU9EPyyS3vxOk8VnBzllbHnE8KOvC6dcQ/sU\nFa6pB4j4fee4ifKQFVrbiDjmELQAWe7Mv1D722PTexMVR5oDGLBJLkXdI9sI\n7m0P\r\n=aj/W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDXkB/Id4HSTrLoMjYHtGKdWasNa8q9SnTybK4Q695xwIhAOSIfaPc5QUEfdI2HZFOqYMlsqtYpirSoOzGm/mOzEWL"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.1.5_1630829549301_0.948877654459148"},"_hasShrinkwrap":false},"1.2.0":{"name":"nests","version":"1.2.0","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"https://github.com/Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@1.2.0","_integrity":"sha512-MS7PnTJoY8Z/71amsohu2uNyX0U5z0ENq/eHZgvNZxH3D9NqqStYNq2QARnsp8ZtpTH+0+f3WeV8j90IMhHkfA==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.2.0.tgz","_from":"file:nests-1.2.0.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-MS7PnTJoY8Z/71amsohu2uNyX0U5z0ENq/eHZgvNZxH3D9NqqStYNq2QARnsp8ZtpTH+0+f3WeV8j90IMhHkfA==","shasum":"dd354ff8bedeeaaed3509fc7e4142a161aacaf94","tarball":"https://registry.npmjs.org/nests/-/nests-1.2.0.tgz","fileCount":30,"unpackedSize":24450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNR96CRA9TVsSAnZWagAACvsP/3OENESly55wfxqkbXQU\ngiM8Bgge9zKfDW+97uFWqXze6EYw2hVANkPL6kIfRK3uiZYCjH8LaFKanr5X\nHQsc4oGvkQYLrbhv/uYLxrxxQu6qIWESPrsCrvEPF/p/S4Ad+SSvqX/gxT02\n1foAKjROfE/0fEPQpwT7EaovK2LfET73Lj4meAMGmhYuEdP7Exf8si+BfuHS\nf9JpFtnU0wf8dvUPqfouQGRIPzCp0CBp3vfn6ZOa3+q44IY6T1OQGkpeTQdJ\nzCyzdYT10p9BmSe6/i1B+uv6dYePnLomRqhz24gbYmIqcQb/NRehPYd1me4q\nnWmCIm7Qm8uNFcR5hXbDTfxwjGzMY6EjA7I6rkUt5Kz+rSLta1GEE3uXvGT+\nFo9sS0i0vpP77p4CzWXBsCiRoON+5SDos/IUlzLlRpnDL6j4XD/Oods3wNUz\n3ReHBqiHfx5Rrz5b0Ph+QNTAny2URM/IRBh9GkQXr8k/uZ6U1TCtKc/E6MYM\njDVG9E1XqoW5MkQg01oDJ6dzCiB5HTAW267ldfSB+n1PdR2oa7d49baN35MB\nLMwpy8NHzFa0RuAsFG2UOtf9mOSQW5xbcT7SqojJgKbVsMgVtsw7DOQiaBfB\ntp1fdqlZ5kFtFFrIafeAfG8ZhxKAY4fbQ8zP+VkX/F5eKaeUrETcJ54jC02v\noheP\r\n=ySIz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtBQk8TQ42XNteO40yXnyN4EZsEDdQRn5dw7doNuSuIwIhAJRc0pe0Wyq8iMoDOUOta8GCdhX52F923MLjA0nedtLS"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.2.0_1630871417944_0.4394183534326348"},"_hasShrinkwrap":false},"1.2.1":{"name":"nests","version":"1.2.1","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"https://github.com/Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@1.2.1","_integrity":"sha512-HFG5U5cJpUgwhhi+vb0s6pQLV7cja1r6EgXke30ja0bKFU7Pg7LVxOUNPQOjE8mnr4ysd63880WTbnW9dFHVuw==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.2.1.tgz","_from":"file:nests-1.2.1.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-HFG5U5cJpUgwhhi+vb0s6pQLV7cja1r6EgXke30ja0bKFU7Pg7LVxOUNPQOjE8mnr4ysd63880WTbnW9dFHVuw==","shasum":"ed0db15a1b7d33534767f7c1c8eed06d075b52ca","tarball":"https://registry.npmjs.org/nests/-/nests-1.2.1.tgz","fileCount":30,"unpackedSize":24490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNSHpCRA9TVsSAnZWagAAHcEP/20FS2YUm6VBPwyVmAAt\n5cvyFDhHZDAP/h65/81dHpvnWVvUfv+kJ2UbhfGmNYMUaEe7i3QdQa1DihZy\nwGi+4ZbSoheASwegzzvfzQC2dZyj+d/Neeg6kRrpCeMkPdBzDuRkwfkJKmhz\nxftfQT/1MnJPk/lsMcJjZdV69Ln/d25xv2Z7zcaYXGmPCdldpAd5wLL9ncyy\nz5NpPhowJlef5qGOkgQ7mQWPdwG5Nbhyf1lwJVf5ys7rK81TO+Dpdooa2Nl5\nWbD0tLsFClnAE0r93OUIEPQpkVJxhVZnKP8LNj354oLB65BSubqktRGHHTuY\nCHnPD8YIXhZU5J8NllyVNVfv2d5ZQh6urNvlCBGeSiHKJ3y+qULd5IjOt7UN\nzm53E7I/f2y7YyFJ2llv49U3ktt0KT43flHOxhH8gJCwvjGHWQYzUd7N6+Ky\nwBWeYbdo2sYBkue3z5uljT+Icrtg+0UUQrbJnV0RJw63DBus+tAJIn75AGeM\nWIJLO6nwWZd9t5nOaQCFixZQsV6xKDEUgxFDc0ohvUl7EVwuoyBlnGHuxXG8\nxg498YdM7/mtt2CTIh47NmzkwoDcQ90sERdblBxiq9KpfjFc8ergEebNfnix\nZU132MAMGKE9W21SM+lAhQp8oL9vymIZFTmgpHA9UPjtBbx301ekskOkw9kH\nxAtt\r\n=WTCM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHE5YynmNLVZssMkIbguZiPXHA7LwW9jx9YM0CX3OvsPAiEA9x4mjbdOcNHQnB0taJtwmfTzSXFLL0wTlgyFeFg+oCw="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.2.1_1630872040877_0.5818702108630744"},"_hasShrinkwrap":false},"1.2.2":{"name":"nests","version":"1.2.2","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"https://github.com/Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"dependencies":{"proxy-deep":"^3.1.0"},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@1.2.2","_integrity":"sha512-7YR+xu6foUOUdzcuihUxPs4FcFfo4Kz1VqW4oMEC8t5Z4mRN6RTkOxMlIPRpv3OHWmLVPrPa6jxDqGCZw2++Kw==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.2.2.tgz","_from":"file:nests-1.2.2.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-7YR+xu6foUOUdzcuihUxPs4FcFfo4Kz1VqW4oMEC8t5Z4mRN6RTkOxMlIPRpv3OHWmLVPrPa6jxDqGCZw2++Kw==","shasum":"03da180a6d5cb07e6ccb25194b3768327aab7ed8","tarball":"https://registry.npmjs.org/nests/-/nests-1.2.2.tgz","fileCount":30,"unpackedSize":24514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNZCNCRA9TVsSAnZWagAAnCIQAIpP3B/HDhjx5gImw6Si\nwhaB9Alh/1rmZQMivQnfeAHYQsyER1YLSfAkWVfo2ugFAW+45SYHOqe2vuHF\nJjkc9uInBtroTSZp/K7cdDnPm/pEZTmxfxRJxVWh6wqN6ycJkRZNx2LYHgCc\nU1ZDZLmpXUMxFd5qhIallWJLblUQIEZ1Crs0hBFX/wkHYNS5Qetz0WZqXIhE\n4sxay7FCSvmOtQ0XFIQuw5cG+0NqE60ft3jHLOKdODc30WBfVE4KyuUSUQ+J\nWAulEePdG+fwAHe0gVqJwYIrwlGsNqyRCbPakNZlLb9BBd6GYGBn9fN64O9i\n/pSGv90/U2Zqj6iit8AlB4Fp6qZQ6M7RsrnyZk7Hy4NaCcW0udHlB9KcUSXv\n5hAgzseYspySR2BMdcmPpndbAGev9MbU+igxIDD/terdT6Aqj9csH0jlb1qE\nQXkfVncSP3fo/S9HnP/0t68mFx/jA265gr9FO9riJgjHHQdWgapWgX2O6Eaq\nazz/cgjrbc3g0enM96PYzK61fjdToiqwbZ6UDHRrVjqDvgF+GWoBbb+P2fdP\noksUud8R2wvyPH4mSp1jpFoNJnqMn07xyjfOhtpvY+a/g3GWaE9u2Dgxh5uW\nlnBDSQQGKTqi2G61RFgpr2URlriyeq+O4IjXWz5yGPer14RKglNZJyV/Iie6\nckQ8\r\n=aGcm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPefKTG0sTw5iVcpQfmxVi+cWdvJ5uPMI3VJLLzdQyAgIgRAQLR8lIhkmgSyEZs57nGRKiC/MyymX8EMGdXyKPlj8="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.2.2_1630900365263_0.21898499459521803"},"_hasShrinkwrap":false},"1.3.0":{"name":"nests","version":"1.3.0","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"https://github.com/Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@1.3.0","_integrity":"sha512-c3HAUxa55yXYWFXN64gCsUMtlk0Lga4+tPfF5r3R8OO6PRkCRYyseof/Ay7PAgTKvKk4xmtt2tj+TiFWiZgooA==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.3.0.tgz","_from":"file:nests-1.3.0.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-c3HAUxa55yXYWFXN64gCsUMtlk0Lga4+tPfF5r3R8OO6PRkCRYyseof/Ay7PAgTKvKk4xmtt2tj+TiFWiZgooA==","shasum":"dbc3315ca37c4aa3ebfc0bf30fed344ac5ac4a73","tarball":"https://registry.npmjs.org/nests/-/nests-1.3.0.tgz","fileCount":27,"unpackedSize":22447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNrX+CRA9TVsSAnZWagAAbZwP/3PtCTN9946830AZ4aK6\nbw60bg/OddHkduqNU9D7/3gTcfCdxyeycFDB1q4M20rM960I83AvqTD7IFfM\nxhw+u/K6RQHwjFcI5XLWy/9aPa47Gtd/bQc88Rl8s4j22hazKwbgmW8GM+Jo\nKUPEb4UBdYw1lUPM+hzbCqtUYn3UYzL4bCQRudDAoAAAC9Kd4b9JP142MtHn\nDj5kS1MtAETaHsNYeg2/OxG0C32WhJWhIxgvpVesZUFpVMsZRUgzONFiEgLz\nVxz1zqM5ymYgZxiWmCqHDMRKUDmY4/S+owcGKOsLrNeDkNNq1RC2/DSdrFKp\nvtBvrL/C1iwi5jCKI7/RWLjhPoj4VQ1D+86E/soqEzUniPsfRXOq4voqpxbC\nZvmrzsp/XtocYOSuJEmgUR24miXkAec3kTDhnxOddXbyfyBYhnIJLvafu21M\nzUM2TW3UPxUbeY1EHWEuBZvX9mmgp5VcNaFKjdNTxeR5S6tM9sxXBMP4zHuA\nyZHc1ThdyeundJ6RVjbkp6QoRsmf4c5j7CNPauvE0jcb7Qe6jHQZuojHOJON\npOhnbcTLfxgUeZhz+2dUDX+I64HfsfUq7bmCoAHTByUdga5Nx11LfpZ6yyIF\nw5ODkh1Dd/5K6LWtVOSJQSUFUT39JSMlWGNlt6xzPtTlw53yaGFl09Gwl+/3\n6AZL\r\n=SbMu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHGd7Esk4xJHhxeNAKXxPDoTMNnAl9lDVKOuZx9Gk+5OAiAoudKGzgqvjed7lWnQFKHVD1fIpLAPKoOXdYmBIIUKbg=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.3.0_1630975486454_0.5323279447046012"},"_hasShrinkwrap":false},"1.4.0":{"name":"nests","version":"1.4.0","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","sideEffects":false,"repository":"https://github.com/Kyza/nests","bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"scripts":{"build":"tsc --project tsconfig.cjs.json & tsc --project tsconfig.mjs.json & tsc --project tsconfig.types.json","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@1.4.0","_integrity":"sha512-kezDCpMLnGZ9GqYN1Q5WFP5ZWnrw4zAl7vRm7zCCbO0w5m3EWjCtQhJb8xmv7SUSCdNhQ2Jy0GkodfqfOFT7AQ==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.4.0.tgz","_from":"file:nests-1.4.0.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-kezDCpMLnGZ9GqYN1Q5WFP5ZWnrw4zAl7vRm7zCCbO0w5m3EWjCtQhJb8xmv7SUSCdNhQ2Jy0GkodfqfOFT7AQ==","shasum":"52a7711d831036fb7c5dc7bf87a90c3e9b151881","tarball":"https://registry.npmjs.org/nests/-/nests-1.4.0.tgz","fileCount":27,"unpackedSize":22776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOEZtCRA9TVsSAnZWagAAdw0P/0cImM2KTmYvL8JNfHGh\nTctXcJVhi9IA3qOH0Obx5TTq7g0IGBEaQa8kekRypym3hqzf5QzJZtBP9m7L\ne0fAL8E08cfjf2UfyX8MwbC+IPIKrzicnyqgy/ilkjEVLUpE1UOJEZui/Wsk\nhR+tFYBbGSqZv6LlMaa8PUf4lnoeJv8ca8NlHzKj6Q3FDzH00rmVSLf+F21b\nlZdQL+MGsztnS3jfHid0LlzWaNCzHIDKD3+gFu14FUvPtMI4rBZlrQSMbHkH\nKp5K9ZZmGTlxaDStJIa/lN2fqrRKimQUSY5KUXCuYaChiZ6MfEZlKR6n/Mq+\nFCFGObAVuinhA1X1jn0a8MWjWFb0GO0EHcY4inRRqD+2WlJlL9KJQNFBGCer\njSM2yAslIND7ABEpGsERrkDLevdvwxndPI1kGTN2KnuHvGvH6UZhtoR5+U0m\nYWY2/RvZiyQUvn8irKH8WymCbpsDH2hphRkQ2O7iZkfUHEFLq5tMLVJduYL2\nIDFekhdp4PW0wmgyEE8Py2mx21riVRAajpuGFYo9Ftmdb81O0zGp1c9NXQRG\nOMvW4oddX6nPMPxcnityBpX0VgvLwqjDBhH3a4UEFVTOzvTUz4VG0hSqp1PG\nl4b//iCigp7nvWpdcvz3U60rD8hixE8V1awlF/WeYg3Tnt0Gt4Qmzzbh/h83\nnWAe\r\n=tZnA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEm6fNg5nWKUURRH7N8qotEEKigbCF3kGqCNQ368lR2AIgUtdiWofGuWWLqGtOlUhMdSMUEZ9Euf27U0qnyVZAdfE="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.4.0_1631077997029_0.8880747034296774"},"_hasShrinkwrap":false},"1.4.1":{"name":"nests","version":"1.4.1","description":"Easy state storage with a lot of control.","main":"./lib/cjs/index.js","import":"./lib/esm/index.js","module":"./lib/mjs/index.js","types":"./lib/types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./lib/cjs/index.js","module":"./lib/mjs/index.js","import":"./lib/esm/index.js","types":"./lib/types/index.d.ts"},"./react":{"default":"./lib/cjs/react/index.js","module":"./lib/mjs/react/index.js","import":"./lib/esm/react/index.js","types":"./lib/types/react/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","solid","immer"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","typescript":"^4.4.2"},"peerDependencies":{"react":">=16.8"},"peerDependenciesMeta":{"react":{"optional":true}},"scripts":{"build":"npm run build-cjs & npm run build-mjs & npm run build-esm & npm run build-types","build-cjs":"tsc --project tsconfig.cjs.json","build-mjs":"tsc --project tsconfig.mjs.json","build-esm":"tsc --project tsconfig.esm.json","build-types":"tsc --project tsconfig.types.json","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@1.4.1","_integrity":"sha512-9ZH7EKWZxg510t+WhLG4om5KItihLsiNUivyRWPVnuEAD74JBJ6Lzsmm0G6MDihPb2IEjyjjLKnXrHZxeu9xHQ==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-1.4.1.tgz","_from":"file:nests-1.4.1.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-9ZH7EKWZxg510t+WhLG4om5KItihLsiNUivyRWPVnuEAD74JBJ6Lzsmm0G6MDihPb2IEjyjjLKnXrHZxeu9xHQ==","shasum":"6133d04845d1ae2a3856c03d08d5ec9e944b1f05","tarball":"https://registry.npmjs.org/nests/-/nests-1.4.1.tgz","fileCount":27,"unpackedSize":25448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOP8eCRA9TVsSAnZWagAAqJcP/23zI7MvCoycWuMA+sce\nKndklxN4wPMwT2tocYPBEbuP55ZJTZb3VvyAf1w06oNhOOJOSgh5OGnQrJSe\n9bkGB5la0hCSod/wjNW5mvCgN00DvYlYz5TptwFYRvHJ5YeRfJIx3rWGfDM+\npK/o0M3kXGy5SQvLc/Rm/5sOzCM60fOrLj2zH1fBCGKeFv3u8ocvq28Yzt3s\nY2egLiT4V+Gz95BRwl2KZV7XX2iIzTTCU1UcrTm6fRloGwImozqzqEkX/9s/\nvknysHXrtQdFg9n384zJzVQegQHnfiuYorzqr1VFEyBWAPQCACOKBcRlgnOV\nEVxW6CMivQIOFmON2TBJf1uSg4lPO36Yz42pQqIr3Op+uYDWHWA2pwFK5xNg\nL2sRteJ+gs3gu8ildub4JruwEgLPZ9ouXaXBF6kZKSLtBdNgmqe/IqZUbih8\n4PHA6Eop/hhFTIF3kCcRZu1/ltRHw3WFuFQaOBCmqPhtt8n9bHlqnS/0V9bn\nQNzTIxKtQlBTzwrU74FOugQ7lLFoDy7fFpONLOKSymJ8vHHLyxANTJminMA2\nu5DiQ2sLmPpVmaqc+OEDXHHVkmAu3NdkO/liHiBLqP5yGdIfoaEvXqmnFSjf\na3UDuVswN9WLL/NWlzC6cAZOPbLiYjwpWadPM2oBcfu4QqN3eEHjg/BXrKAp\nOWA1\r\n=iwek\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHH7rfnHtaKXEG6iRCfqloM1otyj7EqdxyMbqm9Ww5SOAiByYWd/iR+b3Xdu8HfW7XXCu02ouax8MjTdpDIyMZwQDw=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_1.4.1_1631125278731_0.5317559048062084"},"_hasShrinkwrap":false},"2.0.0-alpha.1":{"name":"nests","version":"2.0.0-alpha.1","description":"Easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./index.js","module":"./esm/index.js","import":"./esm/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./react/index.js","module":"./esm/react/index.js","import":"./esm/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.2","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"scripts":{"build":"node ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","test":"node ./test.js"},"_id":"nests@2.0.0-alpha.1","_integrity":"sha512-sZ+iNc7QjPQ8M7TDD+0W0XsbQbmbCQwn2GHtFMYhasVDSPhAONnPozjh2fgCaWNOrf3LzTdCGB08Y8JBgg85Bg==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\lib\\nests-2.0.0-alpha.1.tgz","_from":"file:nests-2.0.0-alpha.1.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-sZ+iNc7QjPQ8M7TDD+0W0XsbQbmbCQwn2GHtFMYhasVDSPhAONnPozjh2fgCaWNOrf3LzTdCGB08Y8JBgg85Bg==","shasum":"8b335c1a98ae6226c994bbac8869ba2f803a0ca2","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.1.tgz","fileCount":31,"unpackedSize":25723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOra/CRA9TVsSAnZWagAAkiUP/3rCTaPco6ffWxCyz27J\nRsQknPdB0P2HT2jQIvKgbErpp2gUY302fPp4D2RTm5eX4RY3DtfkmZSD/+Pm\nToGOg3xuNKw7G5Bwjunvpu046CKKOb6n9KrjXWBlzDVkPTZT1hZQKDGm5rzI\nOjmhi6GSjvqEL+lpoui2TdV5FqIXAWCyyH07NRtBIctAsfHOfl6CrYHcoN3V\nmCWUDaUklmN5GcvvFZHC8wlKDjq9nr8kj3md3Wyw0+6w0szDLVkq0iWGGEe6\njFdodbdzav/mIBdWsr0yYwOiZHUv30GWWP7AiWgt4rIe+2FJ0vts0w6hSq8g\nXlalIQqPrSrfrWjxzKZ5cWlROazslXoPT9tJqInEXd+NAW0LIL/cz3GHO9TL\n71T638WoLQ+ZeLXiQKwNpvOUPAJbVMqNCHqpc+IqniZmq8JWmeYDSqkGpAME\n3dkgBftY0A00P2hLQ2YtL8+9uNZY1a9KRv8VOm5lCTdIoYCAMdxMlH6kmTpo\n8tbLfQMSP+Nd+6CrDIzj24KivNWe9dc2ntmDfViqUBcdkNiUssFofa8q/tn0\nLVxBynvXNDIOLkAYMQ0YOnA8ixj3Fh9m7zoWZJsJ+XuLs/NgxbLKce5UK2Gw\n7CWl0FMlvvBVn/BXfpXBt+U7/CAjOD5vEp3U8v++w0LR9rSxyIc1v4fNTJ1X\nKdF0\r\n=J1u/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDszEiSedl0tihI57Qh6QrLFGsardZSbIceBWbnyrV2TAiEAunI1J8sUNgT1wPYkxQMevPvHeREHu+dH+aUx3X5Vgf4="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.1_1631237822966_0.08952069155085995"},"_hasShrinkwrap":false},"2.0.0-alpha.3":{"name":"nests","version":"2.0.0-alpha.3","description":"Easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./index.js","module":"./esm/index.js","import":"./esm/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./react/index.js","module":"./esm/react/index.js","import":"./esm/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","publish":"npm run build && cd ./lib && npm publish & cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.0.0-alpha.3","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-CWHRV0Dk9HWd9EQIe/6Qjba+TrWTl5TBbqyiLOZs3ZUFPpvQCahdQQVfjfjkDiblJTFN1kAx9ycMz/bBjQQpEQ==","shasum":"4f74a81593cd98983f6b4b52977b3e637c9280eb","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.3.tgz","fileCount":31,"unpackedSize":25613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOr62CRA9TVsSAnZWagAAwXUP/0pOXhTZyO8zOpSQ/RMX\niKAKIfVH/3yDra3XpLuSNYsXG9SK0i7lziA3u4Cs5zUfsJ/gGlb6CzJe7Hxp\n0w1NYKbnjoEHkSnPusObFpY6GnJFdD4cl53IERiKpMYfMbgH4g2mqdVkF4Nc\nBvXR+32lYVuYlodDecXSV1XFopc1EG9F2vtXU4tcjyBgYtExRN07qxlvtmkF\nmlDaFP5NljexGvTphRMSKuxPheP/M+vR4Di0LsxCutAx6QMha62MasK5wRCi\nTILYBlQHzM257Yt0wgHyMdOn8CV1pbumLcskAkDsxBWEXK6U27L4dv4OHXb/\n6M9J9ayWSmMUujnBuRuhBpaxpsrkGb2K+92wGzuJ3rjrPTVXzbbf5aORDy19\nhL1SXNsmS0BtuBqltHxQvCbWCja+XVcTczYUQva0jwge8ygtUi4BFUEjJMdn\nM+u8KLAYXUNhgx71vUozEf3aJ31R0km8zpNJcgFLSaDsf2+L3G9pVB3jB6+v\nsis7uvkq6Paq8+cCtQXMaom+Wfk6vCdg0PDB/2YPUA9ERh+HBDR+eNa/Iutq\nECXGA/Myy9+HGvNb2temdNAtI8XnbZRdAzxKXPGSCe5tmY2M1rrdg2QwtHFl\nyusnjMbrbmU/PVLiC5hIKWidLySsgboUAmgNCqbb+wgL343BSNO0fRkNptL+\niVGD\r\n=dIj8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF9Xe3eJViP2JKSyD7KNyZQcWt6vVtJd++S0vHe39VyYAiAa3hdsUWe16CEMtTZRZY6qu2U8Fv+ThWlB0Qvp7RGtsA=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.3_1631239862559_0.9434339867390911"},"_hasShrinkwrap":false},"2.0.0-alpha.4":{"name":"nests","version":"2.0.0-alpha.4","description":"Easy state storage with a lot of control.","main":"./index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./index.js","module":"./esm/index.js","import":"./esm/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./react/index.js","module":"./esm/react/index.js","import":"./esm/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","publish":"cd ./lib && npm publish & cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.0.0-alpha.4","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-LozWmu/pqJ8bEbyyyG22otimzizajDlAu8EdBXK3cZuPxTH5mT5+2MSMETyi/yOxaZZO0H0+J1B2Y7E7anFZ3Q==","shasum":"0859b7a159607c934d78cd50c5c4c229520c6ff4","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.4.tgz","fileCount":31,"unpackedSize":25567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOr8nCRA9TVsSAnZWagAAh+EQAJ9mDtHL5z+58+uS8UII\nwCd1/mJdfzJuDAuRYhI5TH7oygurLBK0855RHwOYPqqk7wLHSveEm6ns/nc2\nxAcb4Y6eqrQGNSqtV9JPkKG5yKge4T6Dn9GNuc6Oezql8zgC8va6sRdyQZ5Z\n7F/z3azL42wF9+eKw5cuVGS0RUpEtX/MWaLU1aEPpNORDSGCBX9hVhJIEI/v\nSWeXSKuJ8iD7Kt0kxxxS5ENE6bVh6omCyOJfjNNQ5HIjGOskGsgVKD+QMq/f\noJUa87LkdkRvbzRscAs38CkTf5E7XMQ5LomN5oUbqnHfkC9qQDyrDusGtPF/\nYxChFW60BHie62rLg2TGXCyU2xBdJZd0WRaSC702PIr29p0yX7UM8g2WpvnU\n/fVpHHUuF+rAw3I3tESQU5k7ohmMnapN+2LRfwsV5rh8CQhMMy1ih5kWi47x\n4kOPQPN2+3CHWH5YLBo+UvCFJdnsdh2WGR3Y1L4yo2H8vrkI3beV8qySCcqu\nJcsxbigmcTJLI6iMVDRUwoa/rf8WiCCFzVuBGTgb3i9vqv4AxLHqGWj6lP0j\nn0CrMckZkRVeIt310TUn8aTcEnDei/RWt3jZqY8FE+N8sxwA086z9FX7WZn8\nr6RCtIdPpnwA4TksiDLprdOaGobXOyB96BLfsGwFOoiGQfHumTtNNuqzqDuA\n9RzI\r\n=f/z4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBaEBejIkOZtWK//wrvA0S/ETNWJFOX7dYnBtJASmexwIhAKE2dS2dmiYUGzCmUmE66ItPeEHl7QeTGcTxC8qRcx/D"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.4_1631239974837_0.6466666430659818"},"_hasShrinkwrap":false},"2.0.0-alpha.5":{"name":"nests","version":"2.0.0-alpha.5","description":"Easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./index.js","module":"./esm/index.js","import":"./esm/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./react/index.js","module":"./esm/react/index.js","import":"./esm/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","publish":"cd ./lib && npm publish & cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.0.0-alpha.5","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-GU5gi78VFA5gQF+kJ9ursEq9tPC/Qx/lJ2b7ivSHh1gp14tcJ5+abfAIWwptPg+vNqTQwhjAyvw+u+VimJseEg==","shasum":"65e93823018035b97a038df12dfb46f08fa9a8d4","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.5.tgz","fileCount":31,"unpackedSize":25596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOr+gCRA9TVsSAnZWagAAOiUP/2zBgh+1EBtP/ORBqu0A\n0GvrLhQ8co0ez5adkwxkhLr8PhjNKzyh8LpSBWjxLkhgMmvomLrR46uzmXHy\nXHDuaMTe4MlBfmQYnNI//W+xZnva4ZzAPDhIx5dchUT+RPxR0Gbo1xAuXA41\nil/ChzH1jU9UT4UvZmbOtCeTWSCQeYqn1JF1OBGD8vrT0PqdYufhCEaxWi9M\n122Yk++DMZ9JpbK59fjZcKnt9TP80xcmBB5MVLsTtmKTAZVyggbt2p1heE3o\nEVuNH/7YVTPirrXfUpnxhU9LnmHBhaUfsI5zuH3kmljpXYa7z+sK4Oo7sr+j\n8sOKnZCf1xSjcTaYMQlfbHibNrOqrHBh65Wn1Ir+Iz/X5GxRUB9kQCYI999M\nCDa0slCqvC2Vy/gayeekvSIwVU1M1P08aqIdny1iXIXd2E+y6PsbjrQvKclD\n+eo6Vj1Bmft5Zm5G26aBOLMEIy6Ryw87ITiVO15ZF0j2fDEf83X0YnA7/wYJ\nN8N6LmpIzCrIachbYoUrZhXxvRNaC8evMRpFVaXJYE2tbPzoCIsYwaC9PQuI\nGAWExv2qKhUkxnlHPkMXbyc9NIr3Psrmb4wHFvDO3IIp+DvVOn3pDkR5LsZr\nuq+1d4ZJukqKN479nY6N1muTCbxgWvcxZT9DAmxgZgFMr8NbVLwRtpTPYaGc\nkk8m\r\n=TmXW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDC57gAp0tH6vTnHsSJbT8hmqeF1Hxut3Cuo1gGG71uqQIhAJp3XF8c2nPcFeErkFabJRwnrIhRs9vKVPxDt6L47Qq+"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.5_1631240096219_0.21850839149107837"},"_hasShrinkwrap":false},"2.0.0-alpha.6":{"name":"nests","version":"2.0.0-alpha.6","description":"Easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./index.js","module":"./esm/index.js","import":"./esm/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./react/index.js","module":"./esm/react/index.js","import":"./esm/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.0.0-alpha.6","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-0Ump5KoxIaEAHm3uEpXIl5ghVGWy0EH4+mBpji3TSuiw78TAkRTAnEll9jb33GL/omHXKaJK1R5UunarcMwTqg==","shasum":"6baff129ec5b792ef39d01b4f9595019adbe52e2","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.6.tgz","fileCount":31,"unpackedSize":25437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOsE/CRA9TVsSAnZWagAARgYP/jkn/ghEOato5UHuKCIE\n3VVVsm91TCtFYXFiZYKehcoCxsA2pFuscISPB53yaCOpC/u/j3BR4i5SHzj5\nVRQA9vtE8AD9uFeEiEGO/WS73aFpHJ2ciMGa2UodxQnsNURP1CdT/XZLG+Rh\nwhnmWKuuzjgy+4HjlNknuyPjg7MGmVFb6nMKa5ghMrTSIh/hkjCwODXWmfUX\nCvJlEbKlUHLbvzCZYCLw7pXulPkKnZoA6xd7uZWNWF1c3u5cSJWXyNLmdpfs\nxBodGH6+2dueMLAD9bs1GgwsAiJ5UA2Sh1crL1Q/LTt4Ex48AxkjqEJ8rOWE\npnq5hPM0miI3ms2otQ1c4Ujhc+1uf/PpVFT64dRmdTSQF3sxggViX+MBTQ/s\nVoqMXeMz24LIJOk8ZzGUaaNRZ3YufHciIarXSvxhTA+UrERP2qwKr1gBZfjA\nejwkcPAySUI7GeGyvFQ45+Yk5QkSx4VzsGldkmMaqxu04HoY2bOWIOEBTpQ2\nu+6IoyNzKoywixmflnPviuKlBlnZwYZ3paVXWDjSphlv6MXRF3+l2irQ4i1I\n/r2LmjrrXc5jwb1IJTDv1benw+EjUBioMrRDjy7LyWg+aPrEF7DjZh1Qjs8s\na+LXIQNIgdfO4kERd4qrTzKLBCBJxBM0Dy3AQnQqYNs3KAjrnuHzOQ6DJEQ8\ndEiy\r\n=XroP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUZBy3IKocDN5XMyzit/Aa06vXvHfiKPgmrNWYQX8gOAIgcRnipUOl+7CFmzwSelu8RRLVKpQLgA45HzRAH+3x+QA="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.6_1631240511791_0.8978833638814805"},"_hasShrinkwrap":false},"2.0.0-alpha.7":{"name":"nests","version":"2.0.0-alpha.7","description":"Easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.0.0-alpha.7","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-UL8bd4e6YR24MmBfb2jwIbSLo8M0845CthDv56C0R76CR1U4OESVK981ipLT3dJ60kvL64KlDIY6TA9PCBFPGg==","shasum":"429e06b250b7361d061714e7e06c488e417bf12f","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.7.tgz","fileCount":31,"unpackedSize":26086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOtXqCRA9TVsSAnZWagAAmmMP/jUbMXTmfpUdptBbIwAH\nGBZHfYZSWsQ3MTQXqwhn5RUQMqLwfkJnj/+qCSWUkG3ht5We+XPlMGkR42xk\nFy5Er1O2DnJMze6fLC5qsNtmMHalmPtOIn2vWr88OinxnrCjoIkPpKoQBfd+\nIifgIoCg1UwmCu83PpblH7Qcq3Jh4u1Xr7tIcoMWbpG0/nscjtZmU34GA81/\nYNwXHkBx0DQTU5/X4nksd9/Q9d2Gloht4iUBxWKb991kH2MqFBHzLXdmjtv4\nksXBf2d7MImnT3KhnfKxloRVrTNfU9SdNNnkEcWLGES5Wll+f7414pzvDH6u\nFTCyqm8UWQRET5bXmfU+u5EsCaPcudZPpf7uKVMLyW20EJDDtDozvfHwwKzt\nAbFqVInfCdsPXHMe6mM56xumrbc1kGc2YxcmKzp4BVrDD6pEBvuDy3Rh8saP\ntcqKH0rmstQiOje8s7Ggov1TqGnyNteZqion5JqmfVb+FS95LNx/UTZkQJXF\nomm9HEBr5Q1YytotUaUk6LB1FJnBims7ZLJfshEaJiwHcnlQyF+ru53eKEst\nzigMTP+Njt4gCjj2mJnN7lttM1WSk0EFZNygv3GGpsD7Y1leM5uc+Sc+w/0o\nbcZZgy/2vUEzG3EAWS1GoOphegaV8RYH5RqdvLpvuSL1fjz9FvPxjISzdkoZ\nMMCz\r\n=0cQH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHUlkGW4EIxcYnfOsUW9eR1LG6jA/rNpsSuT8KJumqRwIgUKurK+aMWGMbVtYs2FDVXHFy1NnFcQB5ME3G4kZqRqY="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.7_1631245802683_0.5069016375942748"},"_hasShrinkwrap":false},"2.0.0-alpha.8":{"name":"nests","version":"2.0.0-alpha.8","description":"Easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.0.0-alpha.8","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-zDx96fQnuyNsY6EMzXV1x2bB9pqExAd2FIK6aIKl5MNIsajwCl4fEjMc74KMNmgf90C+9IElksutc/+6FILgLQ==","shasum":"d95836a8656ea07f0699dbc46bd3653020ce322e","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.8.tgz","fileCount":31,"unpackedSize":26356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOtdWCRA9TVsSAnZWagAAa5gP/3OOdSQgnt2GVBqIAnNt\ngePwoHNEgXmpCdv0ywshlcoKyvDv/L1jkmb2n13NLyOgkBHAzAM+o43CmOmM\n13QbQxaTJlc1BwB3eRVwAwYi8Lw5f0T/RQPrqszB0rznWdxTxNgXNAq+cwql\nbRH0YEtfJZDGJpB2YUtG4kJu5xrFmDOXcWLI1DfKdNNyUHECuZPQr8EtDeDR\nZm8Y4LDqm6icekNNrfM+hIqlscSPfom6GTeUU0B9PwSjtlpTWN78FExRjgAH\nWEC63JgB6gw7qA8YDQzPHLnLidouNxPkLupNoHpElTpUTCm0zz2VrS/kLsBL\nuls1Aug11Dg5ye+q4ST1Bd4X6GF/qEY47QXhRGlJoT3wAHkukGm8jqD3OfAZ\n7jVJwsZyaWW8Mm3vnaqQA1k9n4zrUlWunBzjpm0OuXIg+NifX/MlKtaudtQb\nKXzIusRd+Hn7uBLD6b59RaP3RNiA2ZVgNvvkUSktMun786RSlQqIVaypNfUA\nIgzWR637PQTrZyVcVTyGTVGdyWqyH/EU1M/1i1Zp+f5aG8c1jV+Qp0FUJn3Y\ntb4O+2gJn+Ejfm0rzlhI3egyTe1T/SFv0lqFIpCcXsIr+Lrnik0kzVm5pbkM\nu8ggIl4/sJDssLN9sxFso15JVVoce10OIedNlPOSt5V6DGvzy/Fy9ERMHMfS\nTlLH\r\n=/0EI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHExlxg8DMwKaHAV/wRA0PbPUFALtt60jCDUQEzqBQfYAiEA5qKIpHe+R5LSoN5/TdmK3Ckxmh3Hchpd6Yipo8HIM88="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.8_1631246165861_0.3692253848488607"},"_hasShrinkwrap":false},"2.0.0-alpha.9":{"name":"nests","version":"2.0.0-alpha.9","description":"Easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.0.0-alpha.9","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-AUPUtSNSnTXR9JNP/YafukcaINE+QLzyiMItEZRUQDTzkLulJJLIZ5pnFwy2LTP2iz3wtJXrG4tGf8b4VWy7Rw==","shasum":"25d474e2f12598142aa80471c94eca88211d0629","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.9.tgz","fileCount":52,"unpackedSize":30970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOtlVCRA9TVsSAnZWagAA8OsQAJp/7hOhmzFp15FGs21G\nyJo5+tkthJeCp1i5Nyx7+WCgRZxJ8KRPxeBMpI+3KAyf2tC7vYAGmQJUGTtv\neef4RLsnQ/W306HUWnYjlXJ5mqFkrqcXXZus2Jbx/X6+xXTUA3UrdRYhknM5\nPSZN6uX6CbtQvpb13raIppouR1ZZuFQ83kXugHNc54MKH8dv/ryIhdf+nqFh\nH1yGJGylGPr3XaVNpjZ5YdkLaWBZ89Oc+HocOaEuLcSSG6ydEn77lB57PIpp\ngviwzLYePyDFvs+s/Odr3pb32MSjKNsv7DcHsBP81z6YkWI6hskdS1Z8VwgR\nJDGeE2gpMveexG12ajSE56xn5lwgkeOM5XGjrdpfSJlS5/uF5rdLip+OKENz\nrq7Ua7N8K+K5E5g6aU01l6sv2xyXpOdoX1RQBk5GVwGCt1yoxUW/0MyuvUxR\nOCrIVRiXJFVoDpKqPUrQrRdTCav6xcV1feQEtaWneOY7K5YsXK9mlr3YfH0A\nyfv7CdeYIHfkDfHWvp26HlGkaXcRKjIbSOYyesflpeIj0pSIwsYWWIe1WCi2\nWhrEkQ7wZ6Z5n2DUZAuwvZvwES6yVnk3JV1jMk2GgAIctEKUaScITAr+MnBk\nujPILZGkaCqAjkw/QJn1tXenDv8ma3GWzTTjIqH2/vfZyHPdWq43BV4DCpcr\nnHr6\r\n=i/7R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsBE+PevuWmysu1y9yQFIwnOFary56eFAYRY5ekkaByQIgU9roGJx+sozGXQ1cIoQ6M/WaEJVTXOT1aKYhpglp/g8="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.9_1631246676950_0.9005780972897177"},"_hasShrinkwrap":false},"2.0.0-alpha.10":{"name":"nests","version":"2.0.0-alpha.10","description":"Easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.0.0-alpha.10","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-G/h7teVYiKFU5WcEbLY8EOZJAOliw3B+jgW34wUklXy9CaGWmbTCEKF43L6AVReP+d8stfQSCDJEBxVUyX9HPQ==","shasum":"28aaaa6dc539d6fc90971293a4f1249a24b1353d","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.10.tgz","fileCount":52,"unpackedSize":30995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOtt6CRA9TVsSAnZWagAAe8gP/R8wqB1n64dWqn7KRpoL\n2fZ2FSpzar1kHrWO+fO3BoTZrXxZsV+cQ4WCIl+THM501oWP3p5OBj38/Cql\nfOCw1GzL9fnJWGjOjQU0riUwrHQFv8I0+HjplsFnaCMWYzQ0qcE7DSN+MZSg\n1LDTZTV3/ZGhPL303hm/jjrJvQt6i3veia0qMBJd6Mj7Px9NyUSUX5AjZpZi\nVJdUbW7q9wljHzgY1DPAnGDmvUUDgw0JWDEHvZmDiFmVmo3d8e5RmnBq37xF\n0srLh5w2Plm+aocINO6S3UGNYX4G0Bny0lgWvakOb8QBaXORz20WyylgXIrS\nmydBCLfLoS/EylxOry1fFWMhujxNXmnOOLb91WlOFOiXwKD3aCczi8GCgT4D\nOaa16el9uc87kLfhUy/mPN8BzKRaRndekPzoSwpG7orj7exn3VeUBxp00QBY\nvZmVirMZccbBrj4wyyZYIrn8Fe6JgqVO8reote6F5AlRwqaVTig75v9Hm4HX\nRSGtiKhMOR9b06PAfBlvemdpYQUlzbqOnS53LOOIrALSVL5/13oztriRHSRY\n6Qt3NGJaDNEn72CvhnBR8MCKQ4LkNo448/Mt2WHYbiq85hL2R/38t8D/Ytgo\n4F4K+7Aa2SNvBq4HDd6Qhe5U9bLtRFwpIGcMHXlHKW2qlJS7pp3nXr/jUSro\n1y/y\r\n=FJNN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBwXn/69FvgTCJ4Tv4NGuKy29RTSsy10g4AJmbdq9H1CAiEAh4iN6xf3R+M3FDAK8eq8CUo+Ps9d+qPWM8UYnp8r39s="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.10_1631247226616_0.6159003471812821"},"_hasShrinkwrap":false},"2.0.0-alpha.11":{"name":"nests","version":"2.0.0-alpha.11","description":"Easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.0.0-alpha.11","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-M3T7kScddUZEqvovEgXzROe+neDzXU0Bk9I7y3xpKKLve0C2aGvty8XXPB6l7BcnGwFQFNlbTI7BuzhIXKIT/w==","shasum":"3e27f4b628ef97737196ee8048b65cce1f39f84d","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0-alpha.11.tgz","fileCount":52,"unpackedSize":30999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOt3DCRA9TVsSAnZWagAA88UP/1JQb0qgFn3aQQ7KiB3p\neMO8/XZAS4y0EwBT5LAepWxEprhNond3C6c3lyh3eV6+G2840yxZnKQOnGD3\nEA7ETaQM2VhnEckERkfpsPMCoXKiHUE8fDsWG0815W+BnfAqVtiDV5VQKfqH\np/Qltu+Fdvajq/Q2tqYxf67KPFOL/chvemGhOfEFCkhkBghDE0ZOHxsBjzCI\nPc3V+/DQhjvZnqCvDggEsCCbLC/GmIFOJiVPLYp7XnMBUKG1n5nX3IRFrjSi\njaQdqwWAXknCqXYmgWxCT/MQXKj6W6cvBIw3UYmY+V0Nm/O823jtJtzBVDXh\n6KG5KnXyShWstN25GY3k5blMOLOnCCkKhgmWgW3YatKy+2FL0hy/djjY13Bw\nP/jE1TwPScbSXSs2GqUUc+PrDWTlWx7A1SX9q4NgM+5nC2i0XJVY563Q/O9g\nxYB7CIXka5kpYFyoWeHsdorOKt2uhm2EBbUNh9eDsHQRjFpnCl3msd6/Ph2w\n2yXh8DtEEco3tWPpVV1RvcDPi9hnfvgoJ4GV8oBRY7vRt8IORflcXSbPh/5t\nTgelkxL4BjqB5iRTZxkt9mrv5IwYj7iMuDfIEGeDCTOsMCvl+amQ/c9Hi1/f\nxaL45UKXxBhm1zx64SE3DFlmqMppAAgSKmzOjRJQpBrgb7+WuqYeFCSQZnF1\nPntT\r\n=5b6l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxuzVeGaUGcxqi8M8si9tihx9XDhI40SS+1tMhwXKmEQIhAP1+wS2UJp17p6VTZDy/aAMDZaSevxZsqGskRkPoND+/"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0-alpha.11_1631247811225_0.45210372146648514"},"_hasShrinkwrap":false},"2.0.0":{"name":"nests","version":"2.0.0","description":"Easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"_id":"nests@2.0.0","_integrity":"sha512-XsdI432oZOBPbqYKrUnkryyWvzkWUzAQoq7clFTAAgs+BLjdaU2WC0M9fJnaIrf6oemFch57Jz4/SJ0bvqfHjQ==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-2.0.0.tgz","_from":"file:nests-2.0.0.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-XsdI432oZOBPbqYKrUnkryyWvzkWUzAQoq7clFTAAgs+BLjdaU2WC0M9fJnaIrf6oemFch57Jz4/SJ0bvqfHjQ==","shasum":"6666746077f65d4cda61077e30aec2cb1f05845f","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.0.tgz","fileCount":420,"unpackedSize":434853,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0JNz8Se4j2rihvgmb4v6xsGnsqM60wq5a/ZKfpLrx0AIhANLP25g8a9qi/F/3BeaHQqLMh1RUocD4/epxf0i8Djcy"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.0_1632432724227_0.41098199159737225"},"_hasShrinkwrap":false},"2.0.1":{"name":"nests","version":"2.0.1","description":"Easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"_id":"nests@2.0.1","_integrity":"sha512-6V+0v7hR77PidV/2BqcqsSv1YXEFxxbeLgE80LLleVR/jmj2b+oPvmPuSWW2IGPeVFl4yA67AmINKKEiVB6KCA==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-2.0.1.tgz","_from":"file:nests-2.0.1.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-6V+0v7hR77PidV/2BqcqsSv1YXEFxxbeLgE80LLleVR/jmj2b+oPvmPuSWW2IGPeVFl4yA67AmINKKEiVB6KCA==","shasum":"fb7c45ac6a41a7f3e9ad71e71d2d2dd1bc8436f9","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.1.tgz","fileCount":55,"unpackedSize":40363,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB91F6IP0xXmzahUEz59S7m8B3q65OBMcLWf48fiwlSpAiAnrrElrSuJzC/+pi9xKl2xyYG8JbVrrpow6Oar8IlOPg=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.1_1632434033049_0.3660641392331627"},"_hasShrinkwrap":false},"2.0.2":{"name":"nests","version":"2.0.2","description":"Easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"_id":"nests@2.0.2","_integrity":"sha512-hcIvRsTCYopVkSQqOXneqoe2Hb+x5VXqoHr3j3+jU4Lxq01RnqdZQnI5onOG9sM9MHdTq4J87U0sZp49Yp2VAA==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-2.0.2.tgz","_from":"file:nests-2.0.2.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-hcIvRsTCYopVkSQqOXneqoe2Hb+x5VXqoHr3j3+jU4Lxq01RnqdZQnI5onOG9sM9MHdTq4J87U0sZp49Yp2VAA==","shasum":"1800d4642e27a864b64db54dea350278b641b553","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.2.tgz","fileCount":52,"unpackedSize":31244,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGV1k3P7oNdIZjydUubCDW25gGpSMO/DlTHE6xSDao1vAiEAtJJzOQTA3XFZmAViSGdk9DwwCgWxhcYysKePieyBDvw="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.2_1632435671789_0.8577098477621286"},"_hasShrinkwrap":false},"2.0.3":{"name":"nests","version":"2.0.3","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"_id":"nests@2.0.3","_integrity":"sha512-jbVEO2yxfdbYe3ulKMIf2snoMDOhXCdvnrBti8hCaoL9kQUhn+3PgO7ep+Ki+CQl4KG9JwxMcMtcRoZY16pJ/g==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-2.0.3.tgz","_from":"file:nests-2.0.3.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-jbVEO2yxfdbYe3ulKMIf2snoMDOhXCdvnrBti8hCaoL9kQUhn+3PgO7ep+Ki+CQl4KG9JwxMcMtcRoZY16pJ/g==","shasum":"f2e0d529b190ac49d9e0f06c68058c13d5d62d19","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.3.tgz","fileCount":52,"unpackedSize":31262,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDa7eivLLxSpsIksakzDw3OVPxED6GkbqqyGy56csqGqgIhAPgp8YQd/54sdO3GqbtrvHD5OrdcmAuXWUsES+ck35dX"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.3_1632436120432_0.29496446620603756"},"_hasShrinkwrap":false},"2.0.4":{"name":"nests","version":"2.0.4","description":"Fast and easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/esm/index.js","types":"./lib/types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./lib/cjs/index.js","module":"./lib/esm/index.js","import":"./lib/mjs/index.mjs","types":"./lib/types/index.d.ts"},"./react":{"default":"./lib/cjs/react/index.js","module":"./lib/esm/react/index.js","import":"./lib/mjs/react/index.mjs","types":"./lib/types/react/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"_id":"nests@2.0.4","_integrity":"sha512-zt9cykHs005YzXQrTkOmnPVO8d9DYx5sQsHT+Bf2d10saLN0TBja+Bo5zuTsnxxx5fx261PyVDocUMF40JdCmg==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-2.0.4.tgz","_from":"file:nests-2.0.4.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-zt9cykHs005YzXQrTkOmnPVO8d9DYx5sQsHT+Bf2d10saLN0TBja+Bo5zuTsnxxx5fx261PyVDocUMF40JdCmg==","shasum":"7fd7c98f6707fdc66f0ecc3d88cbe46496612fde","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.4.tgz","fileCount":52,"unpackedSize":31490,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB928hYv7iSFaHdwXXvxRYxKWA0JUOOYlG0faVqEexp/AiEAzugXK0UwYU+DTauT+SDYmi5fhPC+oemWL72wXoHD5N0="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.4_1632538520120_0.43007963083917256"},"_hasShrinkwrap":false},"2.0.5":{"name":"nests","version":"2.0.5","description":"Fast and easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/esm/index.js","types":"./lib/types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./lib/cjs/index.js","module":"./lib/esm/index.js","import":"./lib/mjs/index.mjs","types":"./lib/types/index.d.ts"},"./react":{"default":"./lib/cjs/react/index.js","module":"./lib/esm/react/index.js","import":"./lib/mjs/react/index.mjs","types":"./lib/types/react/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8"},"peerDependencimjseta":{"react":{"optional":true}},"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"_id":"nests@2.0.5","_integrity":"sha512-BVSniYfOlzqcrRlLqJZa1ijshmZA7nT5Z+0qrjpdmjWkdxR/ZaVcuEwfA4Il3/1d87ZW2DvZjp+N8a4h//gJAw==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-2.0.5.tgz","_from":"file:nests-2.0.5.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-BVSniYfOlzqcrRlLqJZa1ijshmZA7nT5Z+0qrjpdmjWkdxR/ZaVcuEwfA4Il3/1d87ZW2DvZjp+N8a4h//gJAw==","shasum":"d6846cb93279327912d06ef84d62a6ed06630c76","tarball":"https://registry.npmjs.org/nests/-/nests-2.0.5.tgz","fileCount":52,"unpackedSize":31538,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEVZ9ZfXKwcqHtsJyVIumwLm9k2QggtDMjVbxfdgu/bTAiBdOqRg/QhqLeVwCgrc5zfR8F1/kAfr76xsatSe634jrg=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.0.5_1632603417353_0.2694044305857688"},"_hasShrinkwrap":false},"2.1.0":{"name":"nests","version":"2.1.0","description":"Fast and easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/esm/index.js","types":"./lib/types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./lib/cjs/index.js","module":"./lib/esm/index.js","import":"./lib/mjs/index.mjs","types":"./lib/types/index.d.ts"},"./react":{"default":"./lib/cjs/react/index.js","module":"./lib/esm/react/index.js","import":"./lib/mjs/react/index.mjs","types":"./lib/types/react/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"_id":"nests@2.1.0","_integrity":"sha512-sm35fsV6OIOORS1CTBtl3WSrhxan280XGy9gKZXo4eCOmkZKi8eKGsAgREXP7zPWvKh+8WmUUWmIfUa8UAoblw==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-2.1.0.tgz","_from":"file:nests-2.1.0.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-sm35fsV6OIOORS1CTBtl3WSrhxan280XGy9gKZXo4eCOmkZKi8eKGsAgREXP7zPWvKh+8WmUUWmIfUa8UAoblw==","shasum":"703544304d87200663c257eecb618560574198e0","tarball":"https://registry.npmjs.org/nests/-/nests-2.1.0.tgz","fileCount":66,"unpackedSize":38309,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB85Sl8kbPsoDIOvoXBe6K33+rhtiLz/OpM/d9qPRqyPAiEA3+S/719ePUd/jtx4H1OK1oUjxE2rIpLoqPRjPc2kIc4="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.1.0_1632688910705_0.27560297830606095"},"_hasShrinkwrap":false},"2.1.1":{"name":"nests","version":"2.1.1","description":"Fast and easy state storage with a lot of control.","main":"./lib/cjs/index.js","module":"./lib/esm/index.js","types":"./lib/types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./lib/cjs/index.js","module":"./lib/esm/index.js","import":"./lib/mjs/index.mjs","types":"./lib/types/index.d.ts"},"./react":{"default":"./lib/cjs/react/index.js","module":"./lib/esm/react/index.js","import":"./lib/mjs/react/index.mjs","types":"./lib/types/react/index.d.ts"},"./solid-js":{"default":"./lib/cjs/solid-js/index.js","module":"./lib/esm/solid-js/index.js","import":"./lib/mjs/solid-js/index.mjs","types":"./lib/types/solid-js/index.d.ts"}},"sideEffects":false,"repository":{"type":"git","url":"https://github.com/Kyza/nests"},"bugs":"https://github.com/Kyza/nests/issues","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":"Kyza","license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"_id":"nests@2.1.1","_integrity":"sha512-UKjqHFgnh6bm1CFgQDlSltbkOPtP60gxr9bPBVTlTpS9SkVP8v1mwAXcu90hopNvQSgtOM1YWnaagSvAnewAmg==","_resolved":"C:\\Users\\Kyza\\GitHub\\nests\\nests-2.1.1.tgz","_from":"file:nests-2.1.1.tgz","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-UKjqHFgnh6bm1CFgQDlSltbkOPtP60gxr9bPBVTlTpS9SkVP8v1mwAXcu90hopNvQSgtOM1YWnaagSvAnewAmg==","shasum":"f6a55bf5dae83385a8dbd3662f510e5ca4e05a5f","tarball":"https://registry.npmjs.org/nests/-/nests-2.1.1.tgz","fileCount":66,"unpackedSize":38544,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNWAd4s4j4wyD/inTATo+xFCT3OhUKM0iP5uSSmZLQtAiEAkwlKtlN1ZdXyY4Naz8MyjkQ5JBtZdY5oQTiJFsND/Gk="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.1.1_1632689520188_0.3918968134669274"},"_hasShrinkwrap":false},"2.2.0":{"name":"nests","version":"2.2.0","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./esm/solid-js/index.js","import":"./mjs/solid-js/index.mjs","types":"./types/solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.2.0","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-RW1v+NCaNc4haLkq9tW45hMR90o85LwvciozU+E/HB811usi2BPVAnTnOqzkomjeCPkdM55imyod/5VgqLB8+w==","shasum":"66a0268b851332f727bacf0307c054a651a8daf1","tarball":"https://registry.npmjs.org/nests/-/nests-2.2.0.tgz","fileCount":66,"unpackedSize":41951,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAVjOVJ4k9yZO+rJ0uRsj9MJQnLFDKn94xouoMf0RmpgIhANvjGnxZTG3WxKdx9kMgneygiz/MURSZV3kJxnjeIVcS"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.2.0_1632699802340_0.35043965006328137"},"_hasShrinkwrap":false},"2.2.1":{"name":"nests","version":"2.2.1","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./esm/solid-js/index.js","import":"./mjs/solid-js/index.mjs","types":"./types/solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.2.1","_nodeVersion":"14.16.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-rbpIxT/cB9bUEoTCvZUzc8k0ucS0fZaXAUZgCBC6t1Hw5eL/k+95dbvtITeiOoHbPZY9HjAXKOpOPlp0zhWeCA==","shasum":"70d5103d9e8c02f18a29daa8f28d32061d82c0c2","tarball":"https://registry.npmjs.org/nests/-/nests-2.2.1.tgz","fileCount":66,"unpackedSize":42143,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICjg/1b246X0JL2aefoJ+hcRt4RLsUDvEHimQj2GwfiKAiEAjmryUPt3IugicJtaHpc9ysuQOTl2wvpTUXUfjlUxQ6c="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.2.1_1632700915032_0.6450291355307016"},"_hasShrinkwrap":false},"2.3.0":{"name":"nests","version":"2.3.0","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./esm/solid-js/index.js","import":"./mjs/solid-js/index.mjs","types":"./types/solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.3.0","_nodeVersion":"16.11.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-aiOxfx3XnwI1xaZQjx/jFXzVUlxq00+1pBK6FFx76hVmnIkS3bOKAqV7PWUOVePJESLY06EYm7RbYdJ+d/IHrw==","shasum":"9e95d401b9483d9afc966776e1550075f19e6ea2","tarball":"https://registry.npmjs.org/nests/-/nests-2.3.0.tgz","fileCount":66,"unpackedSize":42713,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIACF8TpObF1cmpke1LNTsENYL2ysfbB5IOSUW1UBeXCsAiEAitRhLs/hgQTUVb2p9ykgkL62Af29C0o/OOYJswvv1M0="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.3.0_1634306528495_0.04391528957792623"},"_hasShrinkwrap":false},"2.3.1":{"name":"nests","version":"2.3.1","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./esm/solid-js/index.js","import":"./mjs/solid-js/index.mjs","types":"./types/solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","test":"node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"homepage":"https://github.com/Kyza/nests#readme","_id":"nests@2.3.1","_nodeVersion":"16.11.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-mq9g10tzsaGbS/c5RUJVwiJVqo89JA/KIYPpBDQlKnyviJ7EDUaboIWsuWx0Abe49nys8MjnB6vK53KF1m6MUQ==","shasum":"db890b1cd62199acad3c32aa223178a6fefc5e98","tarball":"https://registry.npmjs.org/nests/-/nests-2.3.1.tgz","fileCount":66,"unpackedSize":42693,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFf37SjwzXAz/x0pXhzjBOKAMSTufwinL/7ssRS0qqc+AiEAnN2hhwLjLVwGnINukfi4huvYqn/A1hD8x3bNSJp9q/8="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_2.3.1_1634315394177_0.8694184466186721"},"_hasShrinkwrap":false},"3.0.0-alpha.0":{"name":"nests","version":"3.0.0-alpha.0","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./esm/solid-js/index.js","import":"./mjs/solid-js/index.mjs","types":"./types/solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","pub-alpha":"cd ./lib && npm publish --tag alpha && cd ..","pub-beta":"cd ./lib && npm publish --tag beta && cd ..","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.0","_nodeVersion":"16.11.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-QcFboZr5hKn95fVilruXAqTq5oomKpHa4lohEIezNmAYtcD2mO40+7Il4ka26Wj/+ttUYYQuByMc7TP/LRO5jQ==","shasum":"49f489554cdb5b3b422388c167a985c2e9cd0e38","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.0.tgz","fileCount":94,"unpackedSize":59569,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvEW++QRZXOFiOKSy/nDfyHUaMio9Bba6CgxXt4xwZOgIhAPAoejog2MaJ/Kienk1HuUFLqzAl50MTvCYHhFHCrOu0"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.0_1634618688703_0.13221655858353443"},"_hasShrinkwrap":false},"3.0.0-alpha.1":{"name":"nests","version":"3.0.0-alpha.1","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./esm/solid-js/index.js","import":"./mjs/solid-js/index.mjs","types":"./types/solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","pub-alpha":"cd ./lib && npm publish --tag alpha && cd ..","pub-beta":"cd ./lib && npm publish --tag beta && cd ..","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.1","_nodeVersion":"16.11.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-Rca8DFIldng8foMfd3PaY2mvrAbugDe7IN5aeAmTkduEPCUpL7UD0dbYPnrbPsHawOpTW7YKHKZDCkNlFEwNAg==","shasum":"a5b170c3b6a1548b6fbd31747058a4042a8ce088","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.1.tgz","fileCount":94,"unpackedSize":59569,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZmloFmpIYmmdvnNCjn117aROANwwvTwBAlvMhIBgnPAiEAjqvEwncyy/bqb7ecgyt9EGBijJlgjkrqBs71KnzmfSg="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.1_1634618851051_0.9485288147268003"},"_hasShrinkwrap":false},"3.0.0-alpha.2":{"name":"nests","version":"3.0.0-alpha.2","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./esm/solid-js/index.js","import":"./mjs/solid-js/index.mjs","types":"./types/solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./lib/esm/*.js ./lib/esm/utils/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","pub-alpha":"cd ./lib && npm publish --tag alpha && cd ..","pub-beta":"cd ./lib && npm publish --tag beta && cd ..","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.2","_nodeVersion":"16.11.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-PpWEpc15zoUluEdNexJGuS3rJl1a09fza10u/2WMRhYZ7Bx1LhEuNqjDayJ6CCg8gjjZktZl8wMMn+2rhIDt9w==","shasum":"a95fa690851fd1aae704ca67624ab63f0e66c359","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.2.tgz","fileCount":87,"unpackedSize":55754,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3TlCC7Dcyi2B8G5qiKnlkFAeotSoPUtVpdF7y6oJ+SAiAjKk1/q+ymgucK2Mb6ovrCiEZjqvGV+L3Q1W01tvsoaA=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.2_1634631860036_0.5300619167835887"},"_hasShrinkwrap":false},"3.0.0-alpha.3":{"name":"nests","version":"3.0.0-alpha.3","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./esm/solid-js/index.js","import":"./mjs/solid-js/index.mjs","types":"./types/solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./lib/esm/*.js ./lib/esm/utils/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","pub-alpha":"cd ./lib && npm publish --tag alpha && cd ..","pub-beta":"cd ./lib && npm publish --tag beta && cd ..","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.3","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-HPifK7Ttcvgsl0A3yOYa3WjvAaeH4/OHRnAlboZ5TScxR809LQ7MqTsxQoGsRwqOchCFqaQZn1i8uUCAEM8VxQ==","shasum":"3672329f9c649d2f59910987e02a65df5b1140e7","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.3.tgz","fileCount":87,"unpackedSize":70786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoWhQCRA9TVsSAnZWagAA938P/1oF+chY7woujjLFbATF\n2b7QQXheWqdGP/N6hvBOkGD0mWJofXpWmOpI4tyosCuwxgkJNmjhgl0R0JOz\nMPAAK8tg11bld8TUm2Bhr9H0c4hV2cyiWt57gkhN+Nkvq3leoY4HuZpfsOvE\n/TifPdY2XcU/vFtjplsGIQNEpXvBCPZDjaDuIrOLE0dkB1M+OZtZhA8DBTDS\nIza9lptftoVXWt6omUpGeYy1lQ9RNupa82PU1eHycc7pVuT1w0aExawpf5cL\n/YS4nngQYJfDXRyCg9fj3TV9igOMI4p6TG0bI76wRiZsfpKAP7ChCh8Vp7DO\nuJTu0043jluyEuwk0c8kCoKoEsQjhspXIMPX9ZHUZo+IMGWIBBR9HPH4raoi\nclLtBmprJ4dCZWFH6Obp5w1+nl2cFMkNqD1BPdWE05kUvk4tWk4Ks2qxXtG2\nNbWNj7rRcTi4jtoj+vnITs5Dwloa1aRUg80CMkGodMlUFssKNFRtur80ci+U\nWpwRezuP7jPVFrRY43feufETi3lspZJJQ0XjeSsnIxtMNkWHMaU3jX2Wy7uf\nqa9xVAJVx080KgzuqPFoSIjAdcdVz6Va9+PEjjTPX3TC0x0s4EeYGSD4amJS\nnxQo4BsrRzTWVKp5/vJxMOMAZrN0gjG1uuXcFNikFfu1/Va8TUfrKfBNAB30\nIjuH\r\n=Q9af\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDfmGLG0h6zBmASsGmmN2CBJsV0gASgZVdSKPHp6mhYaAiEAp6g9LZwxsbevwcU7SC0feNHt2V2EYj/OxUIcELiYcLU="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.3_1637967952467_0.4272647900267028"},"_hasShrinkwrap":false},"3.0.0-alpha.4":{"name":"nests","version":"3.0.0-alpha.4","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./esm/index.js","import":"./mjs/index.mjs","types":"./types/index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./esm/react/index.js","import":"./mjs/react/index.mjs","types":"./types/react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./esm/solid-js/index.js","import":"./mjs/solid-js/index.mjs","types":"./types/solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./lib/esm/*.js ./lib/esm/utils/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","pub-alpha":"cd ./lib && npm publish --tag alpha && cd ..","pub-beta":"cd ./lib && npm publish --tag beta && cd ..","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.4","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-HqxpiqArdok5uPh6FFN7pq9GLKlL331haqe19aHbzNS1a27AXBes7v3eEKPX8XhrtNioCD/GgNuxzwsYQroZlQ==","shasum":"b04cfe295f0f1a15d94ed0ce841778e12afd955b","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.4.tgz","fileCount":94,"unpackedSize":74006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrvUMCRA9TVsSAnZWagAAWfMP/j6D73ecMzCYLZJDK4yf\n8/6+pMEBQD1eAUn9VSTp4zL6VbI6YYKWy2yQ+HjgeLUlF5WaQDTYaB87PDmB\ndJcbKQIoO8F4LqoDPL20qmkXDJfWgX0NtQSqx6Yk3G98bXPGErEx3GBQnHwO\n3+X3WKJbAootkRpT/iC3S8rfnWgZogf2fNU9w1F6Hupd5gnZAT8tu6NsOszW\nsj8OQwOaeQIC8P+St74B744ITxiNJWe82Az8ZZwafz/iyxkyWaoiYth+TCU3\n8UXiElRaTIRCOBUfNtJPGB7YcQgWVIQCwQQJgiJl+/+PdkfxI5JFpdu0t1So\njLKqC8KPKL8yoso80107gTdx2M/jpSJ5fE1/GUpQhb8VpAKSmo8mhfEtQ66e\nhE5oTJbDlXHNRyGgjHAmvOZrAWPV3XpGjdE49yG3l07OvcfsHFJIid7sCtuW\nY86t6Cc+H9zBlmEf7DhRq/fE2rJFRTY7SI0x3XgP0Ue2WWsSvGJFgP3sCuhh\nKe685xchGQ9CYo5a5k+3vFbvlTWSBGjCFCOBTNj180aJEcE2C2oBJvaT67iv\n/yxM4Xx/pWiOmJ2T67JtYe7I+kZy+6EClvD7HqlnJ18Mgf5sMaG1QRcz1J8n\nWO2Q3E1K24Da7jX0j5w7E/ez/eaS3c+luSOusrszYrk/7kplTzEm1MG70Roo\nYfZo\r\n=goUH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICiAh3NNIqpHySuOIzTTqzOJvgRhZIzRQVq+VrXQvMYNAiEA7UUdYFLZ833UC0Jlkv3SnHgW1rSZxWupfJNSWuc2TcU="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.4_1638855948075_0.5839367639239559"},"_hasShrinkwrap":false},"3.0.0-alpha.5":{"name":"nests","version":"3.0.0-alpha.5","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.cjs","module":"./index.js","types":"./index.d.js","type":"module","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.cjs","module":"./index.js","types":"./index.d.ts"},"./react":{"default":"./cjs/react/index.cjs","module":"./react/index.js","types":"./react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.cjs","module":"./solid-js/index.js","types":"./solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./lib/*.js && npx minified-size ./lib/*.js ./lib/utils/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","pub-alpha":"cd ./lib && npm publish --tag alpha && cd ..","pub-beta":"cd ./lib && npm publish --tag beta && cd ..","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"dependencies":{"zustand":"^3.6.6"},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.5","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-C4gu1TT77q0+QPUl3IYiLDgsSWZmB3BAxrU6oBYYMOZKBHT6bNj/FO7VLABALpbJuTzGWOmcS2hkfWDXW/EKYA==","shasum":"2ae2399ca84ab4733f7ea31e36f84b88aa359cb4","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.5.tgz","fileCount":55,"unpackedSize":51432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrv0KCRA9TVsSAnZWagAAxJoQAJrhmKTMP6TWtuAJrg31\nbgxeq7uq7Vt7suplCtxrJMZUpSVEF5w1+7Mfegs3gftRDWEoU6Av4vAijrj0\ngLNfFSLQ4YfVDcFNXigAflPgmdGxyayxdRNle7yOO3cLjQXCclhAKq5wM+8j\nFuB2rwCHzWcuv0dsRaobv8Bti5Xz8acskzUeNPPNVxXROLEn75i2/svUShI0\nKV8m4vuGwkfLhYqjKN2/bXlHg90c53flRV/EIGOdtVw7QT14UAY4xbIE6pZ9\neIsD0ePZPBOVqUF9WBmm5YS5jn/9UXLfy0T+h4QLUqpFBLma8DftPKDFgMNS\nYxVlqa0FBSBWHmdUvNszpENFqBSsg8Ht86km6WtjsxNT+vuunW2Buiw+ABWJ\nhLbj6Gtco1fGlb521rMt16tgwtG7ap/lZU0fRmDb8WnAV+0U4eeFQeZxJeKD\nzJqmUDc2Ml5l9uREhZMSv97jQ7Sgc2Ce4mhE1QKSHwLb2c6qQ3lXk7weKOVe\nBbowdYP+EjTNwgbIiUPNqVF6ap61sXJJIkTFHHa/vUyiWUEZYDZgmViSr45y\nulOjM/p4m37vFPfcz6mnsO56NOYvqcVwHos401P3WjtYHOCJGVHMY+QleBA+\nLE67IcxDTI8KJVQ0q0o+RuoigRof4WGieUxJXrctoH0NbEVaQRndivu7Lg/N\nG0OS\r\n=5RfB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmv405M4/4Gk8K35Gs5JnS3PvUsAivDajXU+bMeRzl6AIgTL9yCDqzwW14MEgwUdLEXugDL4/ukv+a1HRaWz6T2Sk="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.5_1638857993990_0.601555442135491"},"_hasShrinkwrap":false},"3.0.0-alpha.6":{"name":"nests","version":"3.0.0-alpha.6","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./index.js","types":"./index.d.js","type":"module","exports":{"./package.json":"./package.json",".":{"default":"./cjs/index.js","module":"./index.js","types":"./index.d.ts"},"./react":{"default":"./cjs/react/index.js","module":"./react/index.js","types":"./react/index.d.ts"},"./solid-js":{"default":"./cjs/solid-js/index.js","module":"./solid-js/index.js","types":"./solid-js/index.d.ts"}},"sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./lib/*.js && npx minified-size ./lib/*.js ./lib/utils/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","pub-alpha":"cd ./lib && npm publish --tag alpha && cd ..","pub-beta":"cd ./lib && npm publish --tag beta && cd ..","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"dependencies":{"zustand":"^3.6.6"},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.6","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-x3zrl+vqqgQYSVIHx162ZyT2Vu1x9DmUe4x2SjGyERazRCBaLV9PUG0dJziGY55ykejheamggp3V98bOu6x/yQ==","shasum":"3b04fa1d6b4d1fa3baca8690f4db8565b83cdcb3","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.6.tgz","fileCount":55,"unpackedSize":51428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrv+QCRA9TVsSAnZWagAAnDoP/jFcP9JXWrqAQPJhUyHM\n9I35Iar66ak65mzINE4403Hj6WCVdoOGfnqyzC9iaBI8CqXkLyaX50qcL7np\nO6dMDoKumUKuQy6oKS5BMMsMXA8Tpvrcj9pbdUry1RrHsSPKhukAASp31lbx\nf0OnOiILPCINtWpGVvg2PMLCnRd0tBdJIFQ+335EXEMuDNsLtdePMKbzYiRs\nE3r7+sAgDuL9O2KTHX8cQxKBuCx0tQ2Hy0duEh6JTgBCgiFl5b+A2aTJeW7k\nbup+FBfkIb5+R+/rrg25zLcx9R6ruuwveR9fFaWhMUO7yb4pA0irhnEUl4wL\nMblugX7aKmpwTkgf/rMgKL1BUhXbqU0A206gYZIsEkbVVFspQkmg4YgpH9gY\nxfMf+/pfpoM3Yz6wCryQxWwTiFFUM0uPTf5R9xGKa6RPIx6AoYjps+hKUoIp\nh4nMKixIIkO4IyCk32r7KFx+miPszzAciajKXWp3+duETkNr4bFuhvR6JO02\nTR9kJpFObf9ffMxsDP1aY/jRAFE/AiuSllp6mFr6rHbc7/h5PrKaDTbmGG2+\nYZwKFn2nVMFhKClvHMz3aFrJBJxY75kx7Z5u4SHqO1wri6/opTw7+jPi+Fz2\nx/lpvcCLFRkyRv3Wgqc9ueMwxQ9p42ptEBb306bV0CQW3m6/N/GclCUShXnx\ns7bF\r\n=ajkc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9ObGob1CAYWlZStEAJOJJm3aPAxI1RopNhdlqKvEpKAIhAOXv1OEZLqE+zBKCAZJoBjHZDfMn+VC7crHM0pHvHio/"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.6_1638858640246_0.9340993890570366"},"_hasShrinkwrap":false},"3.0.0-alpha.7":{"name":"nests","version":"3.0.0-alpha.7","description":"Fast and easy state storage with a lot of control.","main":"./index.js","types":"./index.d.js","type":"module","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./lib/*.js && npx minified-size ./lib/*.js ./lib/utils/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd ./lib && npm publish && cd ..","pub-alpha":"cd ./lib && npm publish --tag alpha && cd ..","pub-beta":"cd ./lib && npm publish --tag beta && cd ..","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"dependencies":{"zustand":"^3.6.6"},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.7","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-rWMGI7l2PfeUcGaNhEpnJau9mrJcTxVgdQXkLYnhqv5gOm18vQwvxozm8sDHbyUW/R7i0baA526kzA1GNtIWdQ==","shasum":"e42fed764c611d29c595cb2d7bb1f0965bc2e3f0","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.7.tgz","fileCount":29,"unpackedSize":29540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrwYgCRA9TVsSAnZWagAABjAQAIvVKsOdtBKYBjB/AVpG\n9U4d2AkoWdA+6BI5PGvapcavb8DAlcbVV425mNkYYh/YastelRjLeyXHTxBr\nVGLlkrusU/vkRvjUhKHk4h7+HVfF/BEarKhmo25Y3jMQgynz/R26wmiMxFfI\nysKre6L1kj+3lVyN9VTGmYvfXsBO7h4UxpyH02byOVo5x9/Whf6yjNy1+X5N\n0BmITG2EI5NsB/xYmfA/yX7NSYBswvMa0cI6P5qeZgwZIFmQcKJJjCZGuOdr\nkfuRPXeVlMJhJcqtT74k2do4iNRZHAvbinFwFbnpidDuDNRJhrvHM5MiRZpn\n65dF7yb7gfpk6Leh0N+n7dJAj2xuS7k+++OC6gm3IF7fzw7iYXMzhD3e047g\nTWUWsqUtp3q1E/7kt8QDMn99wUZBiJxx+wHi2ReW5KZOP+vBD+B07Wae14mI\nTIznekPoJoFgev+Qn0BN96ngOj+PDZ9elZcNhYe8r40IhTqwzU+PldqnB+WQ\ne+0bE9qMN0qGwfpqKbhKzNylvztliTN119KwIcAyUtfMVSjpIQIFHAL+hdg1\nKIUT8RMVraOOqYjd8Aw3kedn1zZL20mLeRZ9d3JXBxEpfFUlwr8kQJ8gnIgN\nmKPiy8z7mbn/vvAaMMCq8OPvurF/jYEsaOclC9ThwnfeaW7tAZmjKzukwyUG\nRyOm\r\n=asIc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBn2WXEHY/syag84n5nsYSbU3dFbCMqEyqPmA4qbOkXZAiAwfkVCBC/4ST5iw0MzEM4yCnQi0eq5uRQHXkBuyYBvAw=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.7_1638860320813_0.05183586013945374"},"_hasShrinkwrap":false},"3.0.0-alpha.8":{"name":"nests","version":"3.0.0-alpha.8","description":"Fast and easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./lib/*.js && npx minified-size ./lib/*.js ./lib/utils/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"dependencies":{"nests":"^3.0.0-alpha.7","redux":"^4.1.2","zustand":"^3.6.6"},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"b30924bb9d8bc8da5c6ddbc51408a41ac5efb09e","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.8","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-R18Rk+2fwtejPLH041a7VcGJHEE6BIjMdUQ3q8+OV/na996JMMJU+FuhLmCEvCLEuqEENbS+W6CrX7a8Hb1oqw==","shasum":"a71512962085c587e346903dbae85b79e0fe55c4","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.8.tgz","fileCount":63,"unpackedSize":67070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrwpsCRA9TVsSAnZWagAAT3kP+wWZepIcwR6M9rcLFZuF\nzRf3DbR22Rypm14M4gwncsqVMjRtAdM2Fpo/4Jxyu4zc9mWm1AZst7Y+mDV3\nIahA4OLL1Ood7RggbzyHr1S6nvAysLCjt9Tjzsztk98fG4vBNpjb8k9xcHDb\nRbCeEjMvmoiFrHLyPesbO0K62UdfPbQyKtupScfhEOsQ/lbrBN5spinUCFdZ\n4Ms35MJlvRTSG8IAPMsjw9RUpDsQMc526l14yevrKFf00opELUDZjXM4Neqm\n+HeDGrhPWVyG6SGkHOqlkr+wZTyMx/c0JGmy8aOho20EugT4emkfM424m+yO\nzazfZfJAGf3KVhN4d9C9ln2ir/RuZQ7lyEN/5Evv8p87sqZ2dibb88mQ37GT\nRmMihbX3d229LQpo7i8IoiP2aNS21NTKSW0sZbuIN26cF8+NV4XsOueKkEfM\nDYYJvzjvO8DI+bGnTHwq7nICXyC+Lz90z1xxJEvV8R/lGqwKBjYQHgt9sPi0\nTIm4N93wjqNnKVDZq67QF2eFmJAe4FuJNnfUv0Crm0G+qAG9WoBnnI+Z2n5/\n8i6ja0XxqXpwiMjJoCFWQceSBJb1MBjWPXoFhu+aS14KvcOdWB6dGtiym7Cs\nWs/r8d5ECjx21VBFZdYlZW1UTHe0XxsNnmUI43hGNXugssVD2z2GFVUUskLy\nVT9H\r\n=DnPZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqfBqEoInGnoidX/0g4lnlzDnFntT9iX0XcRXkpcLIJAIhAMLxLUoIwuHQQU7e1U5nTzEu2rYszLopG+gawDNjCIif"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.8_1638861420495_0.48089528720263974"},"_hasShrinkwrap":false},"3.0.0-alpha.9":{"name":"nests","version":"3.0.0-alpha.9","description":"Fast and easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./lib/*.js && npx minified-size ./lib/*.js ./lib/utils/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"dependencies":{"nests":"3.0.0-alpha.8","redux":"^4.1.2","zustand":"^3.6.6"},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"b30924bb9d8bc8da5c6ddbc51408a41ac5efb09e","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.9","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-K53IUEjhoWSxr2gRsEx7TcX6u6w5OGsxf0wbez7VgRs16xi8BGmLMaD2MCUFFVyM1uKRnp4rb3sRwUMLYZvvhg==","shasum":"7b82e3cc69a204c2e361fcd5f74510440f7febe2","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.9.tgz","fileCount":48,"unpackedSize":50520,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrwvKCRA9TVsSAnZWagAAx2IP/0DM24YrTIaViQOQqPsT\nbEL8e3vaKy6WorZNhG7e7xHIeWxzJ0tWPeyR2j3+OeKnEFt0ZNcLtnRdM0Kt\ntvgGJTFig/FDsrYm/0RYXsQDY7JQCFCXvF0yx5G5lR5cZOaRH2ZjuyWq0lsq\nIaKbKHg8pY3xfBUi5YRe0Mlh+PPsivOczfpxFRTrUxZwNCCnBfjhqmYJFyp3\nvEXoGLKiSePmRqOAVQtJmrykEV02pobpeqmCK9mFyaHDKYrD0A6nIgCxofV2\nWNoIExqfywLTbPTG479sEpf4wV/gDG5MqA2DsejGvMNpR74s2hVv+MFSNcmU\nwg4/bUi/NsZNGQGI3Q+X60yPmdg0w1lM4gEMtYkCAKuQvcl2DgZlZorVJ0g1\n/Qz3ATqB28u/OHzJqqz8/xivER+/eYAQbGgiD/abNhIopx5ELs/1oHwhhzqn\nqYzRTER6qcpQp8Ao1sLPwVguX9yc/MHfcUw3W7NW6X7XIeDsuxnvKuKmTgYP\nX8Z3MnxEOjeLZVXY81Tv0Pw3b1RZ/8n0YNZxABIghiT7szBH7zN5GfgFWudi\nnKTJSVCWFmJm2yCBczfnBsAZyEPwoA7NZDBCEp3lu2YaKDGqMFIAwDKXgtAJ\noMVc5cZgqnG4bjlJAN+p5GPU3BQD+jIRabgaXTdX0RKqnm9ovFBwiN5m3IfN\nbIxE\r\n=WOZn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFb1SMrRuFasMErFApskvm7bD3lrqCyktZdqw6bJcvrZAiA38Rses78RR7zS1feyLQAjAAVi1AoawOELmYUheRx2+w=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.9_1638861770650_0.06137165952274426"},"_hasShrinkwrap":false},"3.0.0-alpha.10":{"name":"nests","version":"3.0.0-alpha.10","description":"Fast and easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"dependencies":{"nests":"3.0.0-alpha.8","redux":"^4.1.2","zustand":"^3.6.6"},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"b30924bb9d8bc8da5c6ddbc51408a41ac5efb09e","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.10","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-HBSH8LogEBQ9XJNXMRgR1PxE9AgwE6GGal7yWbc2IoveWnIhKcH6mdn1bLEn0FBBFouOKX7w2E1AP0+4nKOpyA==","shasum":"dec792449c0f5981f1e91a5e095fc38eebddd422","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.10.tgz","fileCount":48,"unpackedSize":50695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrwz9CRA9TVsSAnZWagAALekP/1aG40Xn8t8z52JjGaf6\nQHdF/0ExEbdj8Q6I3xQZfph1oAsxwviMmvcx4u3AH72QoUyR8ZN8eXI+wlZE\nHGFGom2C0MTQ+p5IXIMQicKWVpqYFrZh+pO9gXPn4J/CvMxlHobTJSGrHjwu\nYTyQMHqixZT4gA0ufEC1HuVMHN3Z7ckMwRUrQ6kh0xOC1CgNOfyJ17yOXaDg\nlDkQBBhvcmKKDCX3lv2pvJhcvHYYXimOwqNat7TDFZUutFRsToNQl8zxRMLE\nBK2530NwdHY2U5SADSc6lAJ2UfjUJLiDtNYWFl2lRnE9dwifduu+hXVTBiA+\nmDHuP53p5Ue4AWr1K70G890lhI4mZcfusIa0tqfyQDlQufyOPO/OifT8dXNd\nHUzTr8rMFTQGTk3rAHB8Rv9cym/0x1tBGWS4FKO9aU2p87ZU7oFa3sHUVO/b\nWjBr4x0EmS9EhB3UBDIFfzhv0qU/xf+07twijCrVemOat29FWRYLM8dDDqWm\ni3xr1iOczhsEmftHBtgVg5z5Qxcg6yGghI7IBL0Hxg8M2LZC/od0kxpHNoAM\n0FCCm2PB/k51kGCLwxGgIpcU/sjVLbyO4Mb/hCPuEUoDGhSFEkaxFKEs/bty\n9ZyiJCd7n5APYO1tK2ZGwd5vOgpsMGgABJNQ66R7rUDb47YIVmY8wErF2UAh\nL2nH\r\n=WTY0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsEfBHK7jgu63BPvr6CNCtPN/qZBCYUuvXVTcdVl2rHwIgaJZED/fPw4IqN8mKL3QNP/Nol+wRfBOtpCbDZS33plg="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.10_1638862077484_0.73529216523608"},"_hasShrinkwrap":false},"3.0.0-alpha.11":{"name":"nests","version":"3.0.0-alpha.11","description":"Fast and easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"dependencies":{"nests":"3.0.0-alpha.10","redux":"^4.1.2","zustand":"^3.6.6"},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"b30924bb9d8bc8da5c6ddbc51408a41ac5efb09e","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.11","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-wjXgTh/qiHejzSjglMJz4mCQt0uMAbzksHtcgoUDUEU3Lr9Yi3FPEPTU9Rpc/rK+ZwcRpMAIubizQQ8aug5Fqw==","shasum":"6aa0b8687ffecfec38134b9dde5b3fde9b29f019","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.11.tgz","fileCount":31,"unpackedSize":44367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrw6mCRA9TVsSAnZWagAAlKUP/RceYfuDuxO9+/gZbW4J\n/OH9WP282XwYsvXs2tjuhfLmhB9yWZvSjQj4j8hHSNeitxzRti35ozucqPjU\n4Oy1alWmeVn3Dd9QOPvSmmUmwNaACDJiqPeEnqjuAH9iEKy8aT0vTHuV0oSz\nulkULV1CgoMAV0u7iDrEg4o6F9iATwwSvtTYJ/UH9xABmfkheZA2rIzbBDlP\niq4Gkssg2cjBXAUnDZn9KmNvLYpXANRNeoj1+lY73bEQc/LvXiWAdcSWyzmv\nEHChikL6bGktcMD8Zx5IVI3UkpqZK2O+2qbDNQ0kf16DHr+ilFpynfuvWf49\nm4IMQGyJbDhw+5qmgBtmDPm5YZ1AM8VT4Q9W1IT+KNQE6VZvQM2ylluo5XC8\nYUx+mDt1eMQ/U1r7rHPzUAKCK3v3szlCiL/4xQk1zrqJcGvWDusdAFrMhls4\nhEvJNu9R5egiJbbzEFAmG9eM05OU4455/p4idcRo0og/P84NNIXOLG9Cq7hk\nFBEwiFQh3qisEdsHNPmX8qFsjyUPG63e6qzOmzldAQqXFiRwPg634hCDWKOc\nXCI/BAEAGMUB4hMcJYlPVPsL5kaLy06KtH7hx1lp9Ic1v2yxM92oCgDTqx6A\n0V+uV+h6MrkP9rYykGmk71xhy+cxpDaxWRxBCIHsXxki2DRHw8ol8DlZ63pB\nRThG\r\n=aCUy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDYnh0bTWEV1dF0sMKJmxYxQn6ckyBwOyuuo7v3aTIy1AiEAkSdin6/MicQeCOGGMD2YlGV9y9LwYZlhaCUPoKbcQJE="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.11_1638862502259_0.7862259133349327"},"_hasShrinkwrap":false},"3.0.0-alpha.12":{"name":"nests","version":"3.0.0-alpha.12","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"b30924bb9d8bc8da5c6ddbc51408a41ac5efb09e","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.12","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-KBHgLqAmhnKKNnKitOaQDQTpTxxIFkJI1FOMHCZMm43tUta3wWcNh4haxXnBaIkBdrhGcO3p0UZOZlPsmFxWSg==","shasum":"ddfd6249c4230c5df4dad637d2ebdb654df25f5a","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.12.tgz","fileCount":45,"unpackedSize":49669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsFTxCRA9TVsSAnZWagAAqkEP/3/nVuKCikg7FV35LPCg\naIkb6rult/nr8et/MmWkOaCq57U1XCkOA55fgw4DwIGJh0qHNb3k9kdwCHO/\npFSmoar67AKv0vqdnjhtOg9e3Nx19zuah8Cc3WyIaGoMXHLozX42v2+H2or3\n4H6VILLnwyKEfCQl+9EdIuugA0XwPbAXJXGiL1gw2VC22HNALNOqt+T2sqDf\nBobnmEZVoXbNNoGNbYjAhNydVVUhkGO3e2/y1+DWct8tvyVlOsHT3hhOxLub\n217puT1zMeEEE7ivwkNmNaT+xv+oRcz0AtuVyzPFgPLgvLBYck6E/OVg+c4X\n0DbhXFUlWtnOKQ5RjUBHHQ+lNbFXs+4NeWgTllN09T3nEWsAUrcCNIGAQ52L\nS2JCoe2HrezpiozUxUZnC+OYFUtEAtFaV4Zywivu53yttDkcSybifK+Zkmfs\n5AvJKSE/3VopQ7c6SM7AzURo69nnTEwhgcpW8ioCBl+OjPkzyRMV+WveI5/e\na3jwyoRklgOD0VDsk0Mu3oo+Vda+toR+Lp+Lfnw1oA7VK/ps/8UEpvSRCUel\nKXREmG5eNvrqBpPTUlR9HCbl9lzKYJ3tfiLcFm0kFqSPU2BGjLJ7sN0iMM4w\nW/vrZdfly0a5JJN6jvg59xqBpU6ezinVxbrCzno8XrlLOdoQMQGdmflDBiIg\niGDy\r\n=Z2Pq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwqaJkPsHI3+2yiLbyqW3rrENCWDka48M6JJ7ZNjDN1wIgek2hFnDu8hZEsA+vWjGQofAzYH1EbjL0iPgMUZJbKZU="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.12_1638946033848_0.6869741298582694"},"_hasShrinkwrap":false},"3.0.0-alpha.13":{"name":"nests","version":"3.0.0-alpha.13","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"b30924bb9d8bc8da5c6ddbc51408a41ac5efb09e","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.13","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-djnz2RFWnKlwSlVviAND+Tinm6UHV+0JbM/KZalaP/+Co0lcdfk4NHvBPr3bP0tKmee64HHmqSV1M1c8fsUwWg==","shasum":"72a6bd6668b883b5ed5a9152e2c860d1a101f3a1","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.13.tgz","fileCount":45,"unpackedSize":49280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsFYtCRA9TVsSAnZWagAAKhcP/0J1UrrgmIcdnnTHHa7z\nm88p5ITDKiiMmlCuSaIjPvIRUgjZBm/eQwWzl0kFlpf/2zuicUpeFQ8WVFZE\nC+BsP4Wjc3iSGpTnganwifE9Ba8sAIllBZheHwxSRYwf4LWpx/A2N9iUkIzL\nIwc8wQj1SRvoqGSZe4s6WvlEFJJhgnYd5RIE8LZzWZahk6mheyik89+ENBse\nFG/rNCUxWFjot/tfEkdzoVh/U88lLs8PGTn5Zzb0i2aKlWH5EgCeEEWOVoud\naBAftPJQF8je4NqblTbYcSzgvx0G8AdtCYUlg3b5/zAH3NsVxYT8wVMaBgVz\nZ/6htGTIZ5mYpy/PLHuyqIM/b8XGjWFzME98VdkJ+UqGs0dGjTgkPuaCstSJ\nYNd1tEjxEwTOrjlG1cdwyGsPMJVygYmiUFz1gwFZwBomiRa/gsncw+hZ4px0\nSEydJ3vfC+l3y5wvYZm0ojRC2qF9wsxfmARiKsLmfPI2A8Cl3XwDHHtw5mYc\neqLUYJx1cbyaix6/KqvWIxAxb5BMcaO+ujF/i5T4F6lN1G/4IymgHs3Anz4k\nhXODOJM0tUPVZwi8PYluwj0fHkTVAcEV5CjHQmal1v86DjHJw175+8jKAzut\nTZLiSjiZa3OS///RZcd6ICBxE8IefN9C5LD8CT4ABGmZV/yvEq+Q/Znhzuee\nqxnT\r\n=Z0Po\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA30nP17LkuZEqyFRNHph619L2MaObij0Us8n65m+fZ7AiEA4YYk/6jBllVn5c2kOMm5xFQif7B8I1jw4T8PMTm7R8Q="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.13_1638946349309_0.7627564733710519"},"_hasShrinkwrap":false},"3.0.0-alpha.14":{"name":"nests","version":"3.0.0-alpha.14","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"b30924bb9d8bc8da5c6ddbc51408a41ac5efb09e","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.14","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-/ZNUUw34RM3sOwKnQYhnC/IDtGYE3FE46egNo5o6CePuGpwgtcImxoNLSoNfMAfm/I4I/L+y223GguXZTmFoNg==","shasum":"b79662bd6a7675e71970bdd2efb0379ede7c1f6a","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.14.tgz","fileCount":42,"unpackedSize":49000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsPz/CRA9TVsSAnZWagAAs9YP/REvxdMRzXm0d1RWSwVb\nlLzgIuBx+uKC2zya4ZOxkAOvTN6DM7RCiBeQnNkT6j0W0kjDg2KLYvnRKDpJ\nFxuynA1Gn1isfgim4KQNl0Q4+r4PrxJpk6kr7Sm/qgZS1WeGbl0H9sYIs0WD\nzPS0rEqCVd2Gat3oQlZAkVu0jc+JGgj18Z5mOxa6tuZ4/jyuaQNjh6RjAWip\ngQASyRc0Xt4u+GPx0A4jROVmw5sQbQlsId3YO1GCDvIMqUmK/0ZORgNY3NVV\nFQPkWNwJVxnQcuH1r+WmA8fIe5JAWjYc0GfC7ZFY5RfGi4Jli9gqHmr7uz48\nLVAmdhavB4rDsEwGH3woZVl0J+DmXB/U2pQzM6S9U0hgPpHemcIHiGEXKFcr\nSj9PKdYHZSP9O2sXqFCbt2jJ0lZGYLq1YO4o2ndRZlVfwJRqTQ+kvHs+tvtv\nAHa0WzjntnHQjOmeSls9opmNnJ+7r3tkBMyEp0WohX98XCWhDVn0iM9oqsiJ\nHwU9nO7g3KSIJSN4kouPxETeWny68omdwwaaloAazSqM+yG/Efpb1jmYpL6Q\nHNHaZ2iXayBSdTF01ND0wclBiVl8Drn0xKFTalLkrgG1Hd7O0P1J/itCw+3Q\n/N8wwgeh9+nLk/XzJ1rgsupfksBwtYpEgYxbthpazMWrIrf3ziAcqECqM+U6\nrbDX\r\n=EhP/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEVeOdYwNLqhn5BCFUql+3aXyRLvskvo82uAvtGNYYIAiAl2zZXkP41wGjToymBZj1gVBNlNT3W4mhQXTJyV0I1Fg=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.14_1638989055216_0.9350465088204509"},"_hasShrinkwrap":false},"3.0.0-alpha.15":{"name":"nests","version":"3.0.0-alpha.15","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && jest ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.0.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"47a3dd5c83da711dad9c1c9578b6acbbb54c28eb","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@3.0.0-alpha.15","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-EdGc5NgIwu9+QNIUS20WJQl7zpH4Lyf9oTOPn9VU9NUshrN0Px/jmm2QVuFg+oQBw3fjjjP/FtNPjqHfTWGa0Q==","shasum":"a35a2d3ac0d8f58768ff2fe20e2e43a0d71f5955","tarball":"https://registry.npmjs.org/nests/-/nests-3.0.0-alpha.15.tgz","fileCount":45,"unpackedSize":51836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxYTqCRA9TVsSAnZWagAAomsP/0REg+pEnr8ny3oNh3FF\ncx8VCjqRchJlOT1mfehqr8SViH3aVCXMyDyz0UfEIpaZWD8YGGPVhiVvMhw9\nYYp5Zf3CSWsZWwlOsjmdmui9lM6lx5zIsbQTJPsj2MuFLUAdZQRTCdq2ETAp\nKl2O31IOUGznFw46tx94DttQpiQvd2ZJ72F9Fru1Tzl3ZEf+I3871OF1Q1Lg\ni4YVLbpk9XOHskhc7Ob1/BV/Cq/sAPn4SGhCUuE5P8cYdf+kTcbRDh4J6qiV\ncfejTGr7c5Rxv/h4n5/9m5zbKJkqqLjJKqM441ZYVE3Re0wyhnaH2U+XU8a/\nEZt6qHrTVArJ0G5zU77MMHFw1GkeY0eacivJQloQaTOBc96xGKrj2n+suGwE\nDd8n9E0Ya2XWSUdQ+01PzXzAwcMe31yiYbXbqPxfdEtzI5ziT8DJPPcKij35\nwLXVg/PSVsWn4prBZqqJo2CJziCgSDfmMsu0hYIBTOp/NfgQalFXpIEDow9I\nB546EvZcn8HcVQ6mO3zYguJ/6jSgg6DezVIHiYqe2T++DJs4ANamfB0OzhoY\nIOsniHRBOb2bFsu3yqDqihD6EvVhEkKiw0+DpzXsd63E7KmoBXekgVZuKamQ\n9QKRNL9UB9D5JgP8HraB9G3fZWh8aRtQdYD9ad6g4BIUrcH5QkeUB5wsvsAR\nH1Qm\r\n=qyXC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGiaSWlX25l32ukuy1/tgTHVX104xHPb0Gwh6IhC5BQmAiAhJDzTojlbgKrq16I0FcTVsswQPJaZe3Q/qeePqNw7Kg=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_3.0.0-alpha.15_1640334570606_0.21662264333461212"},"_hasShrinkwrap":false},"4.0.0-alpha.0":{"name":"nests","version":"4.0.0-alpha.0","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependencimjseta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"5740d744529c1047518505327ee0be1c0c9191b6","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.0","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-vUdS8ITbyCKMStCBncSosDu/4CD6sUo2utIk9T8BnT0dBruTNtwH4kGGAZiedkjy2Je4s0UCfHR4/ka8V5hN/w==","shasum":"9afaf759477378c37d1328f8495cc0f962c567b0","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.0.tgz","fileCount":51,"unpackedSize":59068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4mIwCRA9TVsSAnZWagAAoioP/18PrEtufNMoB2klLMh2\nN2BU1j0p3D9lrBRnfuw9fEJV7mweTvBCZFvcFlHekDPO6dVQLz8EeR1k+khZ\nQibI6v2TJq2ziHcXT81xY3QDCtEJGwmuUg65NCvaaVz2BxRswiCsKnd1uSiL\nZlLSoF/88cSd/GDnOrYtB9RkYFiO84mv4UySjpct3bRk5zR18WC8n3Cq9cuZ\nljyZejyJ2TSc9o3/1gFS6BvSr+gZ6nmwFFsnhEQfnf1egiB94aZzQ0rSf5dE\nEv0CQHHiv7dIs5HYOA1X9y5BnFH+FxJF265818ouuQcP0v5MxRox1IPNLblD\nNLox8U3DKT+zCDzpl/1dbkDet9TvoXCDPoj/5DIbpDQukdYME2NjCKChcttd\ngFAIg1l56UQQdX4tUax6Zwl4dfGAxGpFBuSNzhfBsbSlvnReROcJj7RF7L5v\n1YqoS23CkKk/lYqck1C7Y5kcHcen1+NAA2FmloocjkvqnEZAkss6ZvDVSnBu\nfstpklWXEdtGvaPfwygcTbOdC/P1xBtTLyHc4CFHwqNTOwiXiz5AwKNGo1s+\npOJrvTRM7k1+m0nE2elP5q8AZL/FF8NURcN3tzHnKsm7LEOaEC3Te0dyv6CB\n12xAitmcvPDEUzEiuzSlbkSodF+I9vlbiQjtAG5ztnAZM+4ETVbgbdYzLrC/\nIKxn\r\n=Hmui\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCruj/tNq+mp5u5YPkEbszZ/VufAoyqF5LfWtiSLohfSAIhAN7mlRv2r+mmAg7vbwwa69WwtDENIboSQsKhQ2WP2MWZ"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.0_1642226224029_0.2789497602871953"},"_hasShrinkwrap":false},"4.0.0-alpha.1":{"name":"nests","version":"4.0.0-alpha.1","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"6041185d1643d5794b43548822873dec107614c6","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.1","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-zlpTQf2gkCySkmqjKGwg6IOdWb2hiT3mc6xsItFId8XgMd90+FpELq/7q6Onu8Dz8m+ZP20zRbE4OguOxi5I6A==","shasum":"a217fbedc25c016bffa6c536cf9afcef6f387ebe","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.1.tgz","fileCount":78,"unpackedSize":67937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5hYLCRA9TVsSAnZWagAAhUAP/1GAYikm0VklvRzmhIzj\nmSihglWzPizLLg57VmPigNleWYOiw55yfCd2Tj22yRKqTknYZT64kwQryzZz\n1nIZuQ/5ccnleQcEfmrVaKQpq/YeP5CW4OZRb5X0kyUSCs7Y8gcUpy7OpvXZ\nOtJXd9DiJAr+dBdiwHeodpcr6xFgh8l695N2HG8UjlZaLlu/MHteGPmmyoWR\nsjxr7G5lLk1O5qR7VrLpT4W9NmThqO+wJuao1KXp1XqkuNL4/uNa7Xaz13m4\nYBWAVZzYuRzhNhg+E67EuzksgF5ufUdlBacTjGYP7wNPECNhDt32qU6lWaO7\nEVBPQ/a2IqD5PbCEbP6DYsUt7Y9qzhveQB87Oj66Un4x9EQ+uHjUFPQnF69p\nvcNUyL4dyxVLc+VQuZ0gQxh5DPawTVEQz3Zg+xi0hr7+bYPKGosBo7a6pLEm\nXWwomasBkDRKIBXWbwSInXI/zgS7HPXlaI7HR9kw1dWUefv4tDTVNc0erFTP\ng5qLCvI87SdSrp61F0ojCKMm6bptIIQZ9wYUi+qKYMl90XpnOepnvcQ8qLir\n7Ol0/YxOjULGG/nogxuAXlywTe6ciA1J9rOM019FdzM3ASVRXyFv21NBv6Mp\nO41AjrvbQeN3K6UeoacIrXt7HOKI/pLEnh58shVIDbPSm2x1wiYau6hXMOsw\nNly5\r\n=H0Km\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICuLRatjTlry0SOpl8Ufl2slDL4KWYppbVbFCWlLLdmCAiEAkiv7AtA494UeSvmveHut/CpU9o9ISFTu1BvqFJH/v9o="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.1_1642468875117_0.9749576299540321"},"_hasShrinkwrap":false},"4.0.0-alpha.2":{"name":"nests","version":"4.0.0-alpha.2","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.4.2","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"2ed229dfc0fb61fbb372ec0fea868ec79f0ae332","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.2","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-N+V3pjlRvzuwZzIepw0b2oZhbumV1mfrBvPj+DadmX/QZi9Bm8xP5mzDBIE7hm/yof0pqxRL3C9v4sQJJV61uw==","shasum":"9440a6ab6b401648fb78f58e6e002b0940bae74c","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.2.tgz","fileCount":75,"unpackedSize":67875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5h05CRA9TVsSAnZWagAAIvMP/RyEnh1b4OtKbJFsP/qR\nmTAXkFm8Up3R7W9c64YIlqJJC7nLf/6jYL5TUiGDnkUTaY6ye2CJtB9VLG4R\nst4lZVSiURd8sQczoWPGEzalUi/ZN8fktzndQOyEKc5uuNVn9vzKBofixzO6\nrJutuxaeAhQ4JI9OYMuPwWALIbLzLqfZFHXnzygB3uewgwuS10GpANTcjILK\nK/EyiYjOViHPH6NTi2jwZbgBevkcewAVI4/jpqGI/pEFkLXJ5nWZl/0GjgzW\nlhJzH3TAJe3jXvJuB1cZnoJCj/NGvT8tLoiChSoBY8RAjNSwQZa0N2PPYRsH\nbKxg+jvPnB7jdWC3Kri/cnwhVB2OpTKuwjtNR9pIH+po8X/g2w6pvCpIVcCr\nfLHot8tLhB461kYoDy+Q/iVMKN47UW3J9Rk3LTUz2ZvCzJPk2a4SXjQ2exB2\nUycmioOVsj9uGhXyugXXwnTvkOdnCaEMja7QH1JE0K3YcARLrndLVQ4SwQDX\nV+pjDXBnO9RnqeIZOFFn2O4VW66cbiW/6pb97G6m6p9uC8fFOYKD6HGiaZlO\nxLF6RwRKcwly0FJhhOWte5HT/iKlcrN/i3BgeziIv9AGYlBeFQHrhpnPv3r+\n//zL72bCBYxU0bCSRs+k1wewte87FiBy6Q62ebOAiIEpKnOqZkNnY7WnYO8h\ns4to\r\n=vbee\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEeFzAWS8yYe/n5q/wFatL/mXZ+CIdn1fFHIyAcpGBkRAiEA4psy7tRfFwkZbnj3WhNMC2E+ccWErGJU983e2LnvCxI="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.2_1642470713196_0.8660481350827731"},"_hasShrinkwrap":false},"4.0.0-alpha.3":{"name":"nests","version":"4.0.0-alpha.3","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.5.4","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"f4645541a66e55a82822395112b5ac85a6eccbe8","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.3","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-ByUY1aioHAUPhXH9tsHIZhLFuoDpjFMipdt7n0uWBn3y+/GP9c3jnSos/hp9rAOKSqMEw3QoeU4Dv3CBh0cdeA==","shasum":"61533cbe79db3f450214db455800aa135ff9247b","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.3.tgz","fileCount":75,"unpackedSize":64667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5iJRCRA9TVsSAnZWagAAqCUP/2N+CujTQd8oDakSl9RI\ndTShn/WBNHTCb6Rw8Wn7tIdyGg2MPbKamy3EHCccWporOnd0GwqJ/K2xW6zA\ns1KQcNQOtAC2o64cJ7Jb3YXdtAAehQ6AZbfmM04hmPoFqR5k0mGGRNnfmqjV\ny7ZyC1U1CXLT2SrKgB+jpGDMQR6wfwF1KNSloG0q6v480azoJEGOfp9lZMTu\nBv6UFYI51qgn6X0xg2Rn5Rp5Vw4KI3lkaIPj8ybdrunfk8I+cYcMNdXJcOzP\nER13dR3RQsGAR0ybOPaTAEkNejzoY6pFQUxgWIJ5K9OYD62m/ViC16+nHRqR\nEZJqcPYyJOm3SoWJArt1yFjyB3H+8tEH+NSjngdrgonPxFDVh0dnhQQMvmu+\nRsNAlrD9Hxntl1BSPA/2nbCSMU3KpFPfb+hgGlSG4oQHOFJxW3S2CxyQE+66\nfm84plTfagxgguSoFBBmmohF9VXr3EHCar/CxnzRP8DAHHfm8xWI8ajwjdNX\nYm1mzgimzrqF2oUCu1Bv0fiyJ6PPSYIUwrSrf9YAP3y2a4yYkgPyvO46MR3S\nEZXD0NWiVi5Dg57k0Dzj4IQ9/PzocGSUyMcGV4c3r6prRVJcpdV64ULG8IZd\n7qf0ocV9Ekn21G3THZsdIkl2tMk0ugO2T7EwsMzxmnjOcODzipW0UnWQZwen\nnWvQ\r\n=4INL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUzZx9wXEWd40zZ4FPu0k7bgSjbMwzNSefSsVmsxuv4gIhAJ1AnL3EnLpapTRWq4JHhSSCohq2a2tDFTjhGkh1o6wT"}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.3_1642472017319_0.6507364692596422"},"_hasShrinkwrap":false},"4.0.0-alpha.4":{"name":"nests","version":"4.0.0-alpha.4","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.5.4","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"409660201a2fadd87f65bc9f6058592dc562bd59","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.4","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-a6M2Z6A74qjrCM9YNIN+cPnYElmclxTiAEVZNWpjBP78gq34QjcM8qbvScsstWEw0CuI6pnttW+fbNTxSrLLvw==","shasum":"633d5ce20e343e757b88c30cc8720bf456810ace","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.4.tgz","fileCount":87,"unpackedSize":68253,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5l8gCRA9TVsSAnZWagAAr6UP/2zaRY97J5L001453SYy\npBCKqQ0rIbwf5BIyzEAcPU9Yd5ubaL+3/qZgujqFxeY/7lStUkzMtqn2CiXK\npIdlY6MghsR6ZK8oT+DpHf2cBrkykcz9yPLRdeRN+S7qw/VLSC5kpGIYoL09\nXyyNXHoLUPFHIhW0mhX4vFauOmG9SBtSWcY3DDt2qw+VOXCooWhfKVcctGnW\nu7DgSTw7TABOJTr+y7dTDYT3GHMUqmdsQQYnP7vfjamj2gh7gx9S0uo6+PKI\nHCh7IspAMs2ooc5PCze9TQ8/C7A7cgHNixRCwPCq89mSeXgLOco4oU+0AUya\nItiNDngNKNxVQwwEy7wgLL4yEuZ1Kh8XKMzMdGg1JwF9ma7yMpJVSOMXvK5I\nk0U9wGyQo8iPYOfGB8dZ6xn1Q3Pvjoy+zgLzJ9TlCTYk/dHcE4AO3Jh82l/d\nclGYkCQe1xfmywtNRp1KnSQXTAyNE0V1VbMRqnrU90jmM7tzytTXw0WU+WuF\nlT54F4H87ugEkK9vhLSZE/GyixwccGwCJFlmx5dI2xiSmckvVsRdiNQ/M9Hs\nePWF3gJyBekoKIdnlfYI9KGtUqNrJAMYsJwuK2g3Wj7Br1/kdO2VuV8U0FU/\ngGtQz44SqDWBNvf/bZjROvo3MCw3QoChnHCcyzn0VAesorfvoVUzXflNmLOt\n/w8t\r\n=dDRY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3miQ0VYDTHC91Z+6uluXDld0eE/ulGxe/i8fXDWa9FAiA4p0bkBRjKuYaibpBLm795WjLZBx7NDoH9UO/x032zTQ=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.4_1642487584410_0.7582090890016135"},"_hasShrinkwrap":false},"4.0.0-alpha.5":{"name":"nests","version":"4.0.0-alpha.5","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.5.4","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"176ca9b4830341c537fe4816f66e6376a1d0a537","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.5","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-RBhC32UVoxLk6aGayvzE4dXqb01wI9aDtTxKS5uXhnuDPc6/jfd98Il4Ks9hZShdDm9fQZu/4vetmHxs+4bwRA==","shasum":"dee413a0e2ecced851e0127f28f8eee48f8c121e","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.5.tgz","fileCount":99,"unpackedSize":74336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7cJ8CRA9TVsSAnZWagAACsQP/22nXdn0Awy1B/7AbiQY\nLWe+OqUkBX9UjHVBV5HcnU2z1zkpYHC8yfpEdew2nAXxNyBs0X2kzzZ9syNe\nrh63dmoayAoGDnr3BLpRPmhrDZUnsL0po+jeFkm8tLyomk+nsXzX5hLWcrYb\n8Z6lEvyeiN/mNzgvGYVZ+g2q91wo2Ek8u/9jFP4U+bGZ8EqlbpmML4uV++2t\nf3h6U+r6X0h45AJ7USIQmSCC3jhbPLnbzUbiFpO9dkx3ebuUVkgWW88bjF0z\nzJK2p8R8t+DHT4C2TNR7bmIaSY5807BmL2Nmqp7blili+GjEHU3ff6CzyUGk\nBSipdrxiDOjQYL1+gSd6af1RJW+lXy841JZBtrZ2zdIXDj64cOm9oanNQAf3\nViZc4q+tuV18nkAw2brFphGaxHWiZhcrdRUehyob4BhKNErXGGijY9n42Jtc\nlFz24+x4LFRPwaqqSsulCjtXGersEUe9HZJIzjpy9xoXdHSZLC9nr0ecxqgh\n3D+2Zuq11sq8SkSPjXvgSQ2o4H9RgMsbRE/6PV/tuSxdgGUtNOXzrifsaaK1\nJvluPl1KAB1fJrHvIfV1mmaac7Dp+53eUJb94mBEhdRLDp9rdjOrhtvokhax\n0q978X2uKJTdA02b5rB1zFvdBTsDm5NxaFA37tOy5fNk7Dc9gGzO2iDI3SL+\nxRpL\r\n=R5r3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHXbmNuyZ5BCnjbvoTp0GXIqYmLS1brRuECurF48YBh+AiBfjoqx0t040jYQVio3BfJsPQsXlvEDRMDUEB3s0MP8Iw=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.5_1642971772097_0.8107940180358604"},"_hasShrinkwrap":false},"4.0.0-alpha.6":{"name":"nests","version":"4.0.0-alpha.6","description":"Fast and easy state storage with a lot of control.","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"exports":{"./package.json":"./package.json",".":{"types":"./types/index.d.js","module":"./esm/index.js","import":"./esm/index.js","default":"./cjs/index.js"},"./frameworks/react":{"types":"./types/frameworks/react/index.d.js","module":"./esm/frameworks/react/index.js","import":"./esm/frameworks/react/index.js","default":"./cjs/frameworks/react/index.js"},"./frameworks/solid-js":{"types":"./types/frameworks/solid-js/index.d.js","module":"./esm/frameworks/solid-js/index.js","import":"./esm/frameworks/solid-js/index.js","default":"./cjs/frameworks/solid-js/index.js"}},"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"npm publish","pub-alpha":"npm publish --tag alpha","pub-beta":"npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.5.4","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","gitHead":"176ca9b4830341c537fe4816f66e6376a1d0a537","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.6","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-pnctFRuBAKvcwH7rD/eCI0RT/TciNGuWhLimmCnh2OW3YAWs+sYSWksmEyhHlJkwRt01k7ri7YkBSi2/dnL7FQ==","shasum":"46c228ed21cbeb569a15a56ffe7a674a0998f105","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.6.tgz","fileCount":99,"unpackedSize":74999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7csZCRA9TVsSAnZWagAA0LIP/0GTxPrW5f26tYYTEI22\nwSLfWqDE+QZZdtCTtBjcrLWaAhsNaxxknaeTxXTBa6oN/tbRjKMiHemySc/y\nTb1GhEZ+6sGqxKt2WO9usNx1IfxhVylFnl+sbX7vcvqB6UImfEYnv9V80rAR\nTROmZZGutnwv/yKexp91M0LPS8l5nOTrU4cLw5egFdi4OWjqXuUEKnFUMHj2\nPdh5MZNiBibH3J/2cvqtrr4dGFfZVGayqDCn4letXmOGFIAO3oWowxAtPV8p\nCfYZMfgNbfbj8IzvVSpALBd/G9+LFCKKlHkXM1zEs4VdSBxD2knkTGPAOun0\neCenq10rnnWMoQ5S7+MtlD5kiH9ulY+Sgehqd+7HYe5aMqoyE4p7Q3uhq31T\nnd1YLbXRMY8b33tCuxktjZeNHxCXL/btqSf7xNclyYGVcf7mi4cfOCs7/huS\nwFTXrwgP/yo4yPUE05L/ilj2DfsGzkWhurJiSqYzwmhnjOn0rIW6z/Xyg8Ax\niSdKe0jFbPS+iD+0yAiroUvvXQsplc8bC5BwcxFqeld+fXkmbo6rm9XnpvBC\nLzbXWU7JlxFU6Nrkru71Tnium+ndDAzh0BA/4FSdI9pOtiIsXgnLxHtm0DmS\nYa6m/6a71ZPqrXDTPvG1hnxa161Pyj22RrdjAVNkfpWxt+4M5HCLb2JJ2YA4\nTcR5\r\n=AOop\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIET00ufHkJ0gJ5VO0WnULFymUHndYXgpy2OCx7FCLMnRAiA/Ysjm0EJYvmwyid2NnUf1gLq7f2fKACz/iPJuc4yeTw=="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.6_1642973976973_0.9784272982973752"},"_hasShrinkwrap":false},"4.0.0-alpha.7":{"name":"nests","version":"4.0.0-alpha.7","description":"Fast and easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"exports":{"./package.json":"./package.json",".":{"types":"./types/index.d.js","module":"./esm/index.js","import":"./esm/index.js","default":"./index.js"},"./frameworks/react":{"types":"./types/frameworks/react/index.d.js","module":"./esm/frameworks/react/index.js","import":"./esm/frameworks/react/index.js","default":"./frameworks/react/index.js"},"./frameworks/solid-js":{"types":"./types/frameworks/solid-js/index.d.js","module":"./esm/frameworks/solid-js/index.js","import":"./esm/frameworks/solid-js/index.js","default":"./frameworks/solid-js/index.js"}},"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd dist && npm publish","pub-alpha":"cd dist && npm publish --tag alpha","pub-beta":"cd dist && npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.5.4","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.7","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-1sggffmuyTEba2wXy933L41htFBW7+FERu4ptablSxRclYMW7LLGk0nTeJ0C+NOPztpA2LTqdvRTiYo6dKmIgw==","shasum":"26363ef8e1b10ed6ae64439075173d06d1f7e118","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.7.tgz","fileCount":99,"unpackedSize":74995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7c1ZCRA9TVsSAnZWagAAC4wP/16peUfmt0FaSGf8MnMn\nPGZuoTVXgHqDVMAfWnBd+ooWnrC1B8fIzVe3/uPw6HGHeVYAQuhpQpmcQyyU\nNqp9ZVBgBtiERpccspsjgh+/oZqDxRqg14VqQk7ProwISk3PX9I/sWDcMIg1\nhfQSKXWY5X08DB+9NRYYjGqutiXe99H+tBWr5tfZl6W4ArPrOly93tdRsgRS\nzDLiZQofxM9zB3R9BuNkq/HxuikQGxYyQo6CbhjsMcCxp5T8aCMFTNEjpmSg\nn4o2tMqLq0OuMEAIW1vKyws3Cgz8h22gQGwtT4Ly6G0ySRy3xmyHrZGb6aw2\nZo1ag64SyRPvbXXHNZDOri5zAYoiMLgclYfEmHcWFYupW3Q2YAUSktiOU3t9\nxrqMw1Ub+yGuu6dPe11qek27uDZ3h7kaU5heqgeHv5wXASEzIOKxD9tHIXg5\nIpegJCxvaBirWbvUzaXLl5Xpoy3tV2WsAer71ZK/Kl1/bpf0LGbFwDsCp14e\n2fqMwGv1x3n6SOwtXmNBivo0O63Gmr9bAVekspQahefP2+Z78IIKv19/9etD\ndg9ukUqMxcxcWF1rC62Rlj0NKqJD5rMI4q+Un9UhGvsMwLA6+5rAphPIDQll\nypeD00L9/ktCvAn6HgJdihM1o4Tig2IcjhfcGvJaqaaJHom7cYQSR84Fj8rS\na8/h\r\n=JYHO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEQqWyNBnuHz87MDG/Sn/Oj8vTLf8R1AB73Vk9pUK2fmAiEA2926/NLN7ke+fH6T2GamxkkHo1RnizGyyH+VN6/PHXw="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.7_1642974553262_0.33220594074281196"},"_hasShrinkwrap":false},"4.0.0-alpha.8":{"name":"nests","version":"4.0.0-alpha.8","description":"Fast and easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./types/index.d.js","sideEffects":false,"exports":{"./package.json":"./package.json",".":{"types":"./types/index.d.js","module":"./esm/index.js","import":"./esm/index.js","default":"./index.js"},"./frameworks/react":{"types":"./types/frameworks/react/index.d.js","module":"./esm/frameworks/react/index.js","import":"./esm/frameworks/react/index.js","default":"./frameworks/react/index.js"},"./frameworks/solid-js":{"types":"./types/frameworks/solid-js/index.d.js","module":"./esm/frameworks/solid-js/index.js","import":"./esm/frameworks/solid-js/index.js","default":"./frameworks/solid-js/index.js"}},"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd dist && npm publish","pub-alpha":"cd dist && npm publish --tag alpha","pub-beta":"cd dist && npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.5.4","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.8","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-3yYqSDtiedHAbuIfUv8KVYm7Dxs9/I9kD+PHBHk1J88/pwsFDKx67j5nBPkhtIa2ggz53zqvw6FoX30ewxDD6w==","shasum":"c334500d3cc073e0752b7d53eaaa8219f607588b","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.8.tgz","fileCount":163,"unpackedSize":89193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7c4PCRA9TVsSAnZWagAAVwsQAKEDYnGMDl2NrLyc++Lh\ntjPeKCY7YjJRGCQnGa3wi/NKOcir5DVKqNeJnoen7V2QgzqZk+PI8YUwqyqO\nwiHGsAsnopJHfrUWd7N2gaaAslksSWhPiS41OHsQ+LSxkO8JKfEf67kP/r78\nOTq6GiG4MKSxQUxoVPWiCQsjoo5s7cnKFSwOT2GL1L0qxS/PJggRbvNPnf3Z\n01FuNXdTbOGg8OxqqgT/ccdYCC5yeTyKc+bmTKnn5X4PZImDk5TpO2O8efOv\n3rXMfTR9N+M9GaYkmyPslopo9GYvt89zBuHRL/kCdJVLRzLVtLOawssNwUye\n16eutt91UctBMUjjNNPkheOPPOh+z59gY8TqkNq42LKy3Wn4Uam2c6KGAZef\nz6WtEReJO2tfN3rTfo9EAy5BR87UkGEclMDxV8orEF/47KC/MPgNqjNUrMeq\nwUwyJ1rKnOjR8aJRxmshNWuMOhhC1KibuFJq8hPDjVnawVJcXCK9HSoJ0CmF\nAhBA791fLFYRUxz+86e+gSbd7tyeIzIdLHDrqpdiBOxrIEY1zaaGMFckl5h5\n4R+lawVIZ/AiRdNLmNHSQZDhP+FI5q0bEDiXlwxR7BSQ4ORz+M9lONwyHfiy\nYXF1cEpl7yoT9CE82Ony7R9+KKUsjzA2dU1CnPxj0vHSzwLSY0inV7Gbx5uy\nn/35\r\n=zUEB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgcbpD5fsT2uytnfuKshf9Efznr8gfTwz/2mtDW6cptQIgcg+snccejcpIHa/upndFhSKs2l3pgGR5Qs1d8poxEQY="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.8_1642974735623_0.45974007502910497"},"_hasShrinkwrap":false},"4.0.0-alpha.9":{"name":"nests","version":"4.0.0-alpha.9","description":"Fast and easy state storage with a lot of control.","main":"./index.js","types":"./index.d.js","sideEffects":false,"exports":{"./package.json":"./package.json",".":{"types":"./types/index.d.js","module":"./esm/index.js","import":"./esm/index.js","default":"./index.js"},"./utils":{"types":"./utils/index.d.js","module":"./esm/utils/index.js","import":"./esm/utils/index.js","default":"./utils/index.js"},"./frameworks/react":{"types":"./frameworks/react/index.d.js","module":"./esm/frameworks/react/index.js","import":"./esm/frameworks/react/index.js","default":"./frameworks/react/index.js"},"./frameworks/solid-js":{"types":"./frameworks/solid-js/index.d.js","module":"./esm/frameworks/solid-js/index.js","import":"./esm/frameworks/solid-js/index.js","default":"./frameworks/solid-js/index.js"}},"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd dist && npm publish","pub-alpha":"cd dist && npm publish --tag alpha","pub-beta":"cd dist && npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.5.4","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.9","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-0LRaB9aAHt+heMFm5EY9oXo6I/tSFD5tphmkWzzvnkHRq81U+7IdiQj6tvoKcF3Q30PhWFJ4mqpDW8uwZitVhQ==","shasum":"8e9ddd6c2e01727130cdd5c103428f99b7816a8b","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.9.tgz","fileCount":131,"unpackedSize":82208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7c+3CRA9TVsSAnZWagAAieAP/RoY803/y3BiQYwP2N1v\naEimh1V6rRwuBtJB8NKauDILVMoh5WYAo4u00OrFgfeilSaMUMxnHgG4fCfu\nANIj6PFIBG0qshuW1rIkECLhug7V2MqNyA1ZjPpw4NJL3mNAlMIcqCYNWxe2\nWWwEx4g0yhyBaYgTpkH0s2mkOzWTxKZr5dxIzgFOQd4yYmszJ95IYz4P0lw+\nKwGlbJJWbymrMUaJfA3C4314S9TCGOTdj2KlAqSYnLmADn1k2cR3FTA+T66Z\nbB7DyPq+a7zwpQSTBbPPrdGJd5NuY703Z0qXZWQR5QW/UggiFfykEkhjJXKf\nS5BhsnuQe70uUnhY6lhVo9yvdRrJS258ADBnG1k954wkUBWz42VUtI+VyvTL\n2ozSb+H6gVdbtLDht3H9VLK27d+yZOyHj4ERPp00imLmBC+aANCKqON27XZq\nPyGvonxBZH579iB3kHLxsGhF8xteGxQlC7kZTGvQUUC24XUpr6eI9mG79pKO\n5R5HFKk9zDCcYVPbwKL4ET1uQmF8AUIk//99S6+Q0hnFoRAka/A7ndYSrwbU\nWyY8oL7xB4IUPHs7kIQhgr4ESbNcekMOFX4tC6Y1acr2Jzei7cRconRlNoaG\n0OesTTtHEcpzyf4x1bbjDm2f5d+3SlrE1m9xk7oW4ZsUY499sZtf/OdApBdq\nq98I\r\n=j1JX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCx5ywEtJU+8qg/0P45vb+279Gx2wd5y8sgh7dyFOQ7gQIgQvCrIDKpeMhlw+Cdf1QKrCyiLTFUea8PXjUL6B34YiA="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.9_1642975159672_0.12681677232341104"},"_hasShrinkwrap":false},"4.0.0-alpha.10":{"name":"nests","version":"4.0.0-alpha.10","description":"Fast and easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"npx swc ./src/ -d ./dev/ --watch","pub":"cd dist && npm publish","pub-alpha":"cd dist && npm publish --tag alpha","pub-beta":"cd dist && npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.5.4","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.10","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-x4komFqt2wfU8+JBGhfgy56oQk8cjbuVlGPU9mGnx76kS4aC8X+Wxsv9hRirBh6kjUbC7bS5gVSgJR9xkya3Rg==","shasum":"7142703e69d06c55473d05839ed26cd57599f9f5","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.10.tgz","fileCount":131,"unpackedSize":81438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7dA/CRA9TVsSAnZWagAA0NUP/3P7iFF7REelFsnCm+0U\nie4YZg5pYdTaD8aax5f20f1VuHIVrKx5HJI0iXdWsh5F7PcnJ5pZ6VE/z2KS\nKP6ckuSN+2z+Sn/RIQHDl/3MYO4uIYDKH2bSsJPUew9nmkuYfSGHTg3yEIlP\noXNvXhdUv6zrZ4lvPgaRE5mJUNEZSdn8V9GKMv34dgsPy21R11RAgAbBU/d9\n6KJNmpKxXIt9NEzTl9Hhkzwk0qOz13I6rI4J1rjgC6XqJOi2VQXlgGQ/sSWo\n+jliEiF3AFInV1pADqcHWGLBubo4nHOG/rSbMtu/apcc67m+M4kHIU3Ynzij\n4jZpEdKiTEpCkGOt8+vk3rzHxmKK2ngtX2MZidFUzEzwtOBGrRYvMVw9bmbv\n1vXvatzWrj9A5NL1eUzkXViXVrCfUwYjOQdWBFPqTycMQxZzwrEJ30b8/M4t\ng7wXbrjEpvObdDH8Y5mNqTffG7MQ4Jdff0ST2Owgyvh1N053p8JKOCdbxRou\nhSUSuykiDGVcSRJFONm9dJtiPDScuntRg7fRMc5QD+x8ojnolCuJ74TgVdcI\nywX0oxcFtvNdeTVi7b3FuU05ifOLJOkhhuZKEkC48r3ZsNDAv8lw3tB9sUS2\nxV+AXLsO97kGrG7SGypgM2eph85YspqnKYJ05EelXsnIZ+nD1seYQwijZ4gI\nbkyl\r\n=yCE6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFBPcj0oNX3Dk7MM+C/E7LZRyWALG876eHVQMmkW+SJFAiEA8hA9qJ83aKKr8f7BPgBLKYJPqlNjvP7fa4zmQIKzDVo="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.10_1642975295491_0.8044424088084996"},"_hasShrinkwrap":false},"4.0.0-alpha.11":{"name":"nests","version":"4.0.0-alpha.11","description":"Fast and easy state storage with a lot of control.","main":"./index.js","module":"./esm/index.js","types":"./index.d.js","sideEffects":false,"scripts":{"build":"npx zx ./scripts/build.mjs && npx minified-size ./esm/**/*.js","dev":"tsc -p ./tsconfig.dev.json -w","pub":"cd dist && npm publish","pub-alpha":"cd dist && npm publish --tag alpha","pub-beta":"cd dist && npm publish --tag beta","test":"tsc --project tsconfig.test.json && node ./test/test.js"},"repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js","immutable"],"author":{"name":"Kyza"},"license":"MIT","devDependencies":{"@swc/cli":"^0.1.49","@swc/core":"^1.2.84","@types/jest":"^27.0.3","@types/node":"^16.7.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","chokidar":"^3.5.2","fs-extra":"^10.0.0","jest":"^27.3.1","minified-size":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","renamer":"^4.0.0","solid-js":"^1.1.5","typescript":"^4.5.4","zx":"^4.2.0"},"peerDependencies":{"react":">=16.8","solid-js":">=1.3.0"},"peerDependenciesMeta":{"react":{"optional":true},"solid-js":{"optional":true}},"readme":"<h1 align=\"center\">Nests</h1>\r\n\r\n<p align=\"center\">\r\n\tFast and easy state storage with a lot of control.\r\n</p>\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/github/watchers/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/stars/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/forks/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/issues/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/prs/Kyza/nests\" />\r\n\t<img src=\"https://badgen.net/github/license/Kyza/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/bundlephobia/min/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/minzip/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/dependency-count/nests\" />\r\n\t<img src=\"https://badgen.net/bundlephobia/tree-shaking/nests\" />\r\n</p>\r\n<p align=\"center\">\r\n\t<img src=\"https://badgen.net/npm/v/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dw/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dm/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dy/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dt/nests\" />\r\n\t<img src=\"https://badgen.net/npm/dependents/nests\" />\r\n\t<img src=\"https://badgen.net/npm/types/nests\" />\r\n</p>\r\n\r\n---\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nconst nest = nests.make();\r\n\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i nests\r\n```\r\n\r\nWhen importing you can specify `nests/esm` or `nests/mjs` if your bundler is giving you problems.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\n```\r\n\r\n## Links\r\n\r\n- [GitHub](https://github.com/Kyza/nests)\r\n- [NPM](https://www.npmjs.com/package/nests)\r\n- [Bundlephobia](https://bundlephobia.com/package/nests@latest)\r\n\r\n## Features\r\n\r\n- [Instant Deeply Nested Objects](#instant-deeply-nested-objects)\r\n- [Automatic Events](#automatic-events)\r\n- [Ghost](#ghost)\r\n- [React](#react)\r\n- [Solid](#solid)\r\n\r\n## Concepts\r\n\r\n### Store\r\n\r\nThe store is an object that lets you store data in an instantly deeply nested structure which automatically emits events to subscribers for you.\r\n\r\n#### Instant Deeply Nested Objects\r\n\r\nHave you ever had to do something like this?\r\n\r\n```js\r\nconst storage = {};\r\n\r\nif (!storage.hasOwnProperty(\"foo\")) {\r\n\tstorage.foo = \"bar\";\r\n}\r\n```\r\n\r\nWith Nests this isn't necessary anymore.\r\n\r\n```js\r\nconst nest = nests.make();\r\n\r\nnest.store.foo = \"bar\";\r\n```\r\n\r\nThe code is even shorter and more readable.\r\n\r\nYou can go as deep as you want instantly without having to check if the property exists.\r\n\r\n```js\r\nnest.store.foo.bar.baz = \"qux\";\r\n```\r\n\r\nGetting a property that doesn't exist will return `{}` instead of `undefined`. Use [ghost](#ghost) to check for non-existent properties correctly.\r\n\r\n```js\r\nnest.store.foo.bar.baz; // {}\r\n```\r\n\r\n### Automatic Events\r\n\r\nNests comes with a small, custom, and fast, browser-ready EventEmitter.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.store.array = [1, 2, 3];\r\nnest.store.array.push(4);\r\nnest.store.instant.deeply.nested.state = true;\r\n\r\n/* Console Output */\r\n// set: array = 1,2,3\r\n// set: array,3 = 4\r\n// set: array,length = 4\r\n// set: instant,deeply,nested,state = true\r\n```\r\n\r\n### Ghost\r\n\r\nThe ghost is an object that is dual-synced with the store but isn't instantly deeply nested, doesn't emit events and is faster.\r\n\r\nEach nest has a `ghost` property that can be used to modify the store's data without triggering events. This is super handy for doing heavy calculations with many mutations and creating transient React components easily.\r\n\r\nThe ghost of each nest is directly tied to the store so modifications to the ghost will be reflected in the store.\r\n\r\n```js\r\nnest.on(nests.Events.SET, (eventType, { path, value }) => {\r\n\tconsole.log(`set: ${path} = ${value}`);\r\n});\r\n\r\nnest.ghost.array = [1, 2, 3];\r\nnest.ghost.array.push(4);\r\n\r\nnest.store.array.push(5);\r\n\r\nconsole.log(\"The sync goes both ways:\", nest.ghost.array);\r\n\r\n/* Console Output */\r\n// set: array,4 = 5\r\n// set: array,length = 5\r\n// The sync goes both ways: 1,2,3,4,5\r\n```\r\n\r\nIf you want to trigger an event manually without using the store, you can use any of these functions.\r\n\r\n```js\r\n// Use this.\r\nnest.update();\r\n// Using these is discouraged.\r\nnest.get();\r\nnest.set();\r\nnest.delete();\r\n```\r\n\r\nThe downfall of ghost is that it doesn't support [Instant Deeply Nested Objects](#instant-deeply-nested-objects).\r\n\r\n```js\r\nnest.ghost.foo.bar.baz = \"qux\"; // Error!\r\n```\r\n\r\nThis is also a good thing. It allows you to check for non-existent properties unlike the store.\r\n\r\n```js\r\nif (!nest.ghost.foo?.bar?.baz) {\r\n\t// ...\r\n}\r\n```\r\n\r\n## React\r\n\r\nHere's an example of a React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tuseNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{settings.ghost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={settings.ghost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient React component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/react\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tuseNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{counter.ghost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n\r\n## Solid\r\n\r\nHere's an example of a Solid component.\r\n\r\nNotice the key difference between Solid and React's `useNest` hooks. While both hooks return the ghost, you're required to use the ghost the Solid hook returns in order for the component to update.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst settings = nests.make({\r\n\tenabled: true,\r\n\tname: \"\",\r\n});\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\tconst signalGhost = useNest(settings);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\tsettings.store.enabled = !settings.store.enabled;\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{signalGhost.enabled ? \"Enabled\" : \"Disabled\"}\r\n\t\t\t</button>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tvalue={signalGhost.name}\r\n\t\t\t\tonInput={(event) => {\r\n\t\t\t\t\tsettings.store.name = event.target.value;\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nHere's an example of a transient Solid component.\r\n\r\n```js\r\nimport * as nests from \"nests\";\r\nimport { useNest } from \"nests/solid-js\";\r\n\r\nconst counter = nests.make({\r\n\tcount: 0,\r\n});\r\n\r\nsetInterval(() => {\r\n\t// Increment using the ghost to not update the component.\r\n\tcounter.ghost.count++;\r\n}, 0);\r\n\r\nexport default function App() {\r\n\t// Automatically subscribe to changes in the store.\r\n\t// Pass true to indicate that it's a transient component.\r\n\t// Here we have a filter as well to only update the component when we want to.\r\n\t// That lets us avoid updating the component when a property we don't care about is changed.\r\n\tconst signalGhost = useNest(\r\n\t\tcounter,\r\n\t\ttrue,\r\n\t\t(event, type) => event === \"UPDATE\" && type === \"counter\"\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{signalGhost.count}\r\n\t\t\t<button\r\n\t\t\t\tonClick={() => {\r\n\t\t\t\t\t// Whenever the button is clicked, cause an update on the store.\r\n\t\t\t\t\t// You can pass data to the update function which passes it to the filter in the useNest above.\r\n\t\t\t\t\tcounter.update(\"counter\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tUpdate\r\n\t\t\t</button>\r\n\t\t</>\r\n\t);\r\n}\r\n```\r\n\r\nNotice that whenever any data is displayed the ghost is used to retrieve it. This is because the ghost is faster and doesn't emit events.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Kyza/nests#readme","_id":"nests@4.0.0-alpha.11","_nodeVersion":"17.0.1","_npmVersion":"7.19.1","dist":{"integrity":"sha512-8kT9OUUK6xqOo7fQz2bITm1EVTkjR2hjHFsmAgsliUG5mKPtztbhtHwrkgqQethQYQI+G6M4gH5hn1RRNDRw1A==","shasum":"67e8591edbee9a09f37609d2f88889b3ae46949f","tarball":"https://registry.npmjs.org/nests/-/nests-4.0.0-alpha.11.tgz","fileCount":131,"unpackedSize":75726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/jJtCRA9TVsSAnZWagAAkGQP/R00XZxHe3maozXLaNU5\noZ1MHVibrSRKk695ApAfKIiGwBM/hDTv1byTq9PjOUTc4Tge7iYLguRQZ+pI\nV0G9LzKvwe0pR92EvjBNHuwvOUUV53leoaveRBMVF+T8hnbW17Mh+tZsuTdu\nAZYOAeYMOQdXdqHTi25AuESq7I3kcUbJXVcXLgvTN5UO0wkEkusPtfIyezFh\nb63oUOves+2OJpgCzb5+uH/CEf0yRjANHBsf+eUApAmi5tD9hhHJv8Bhq9ep\nlvzIF89l43jVaU8tAJCChSSoXorJ2JFLmj4gC7yKZqdXSQcWTyGFdDvKk1zH\ntc6jNx56x4LxhoY8NmkkD1I5eOBkzfMhbeYgDmn8j4TBf/i00xJHvY3nKY6+\nZpFeMVS4v1U4aEGhrKuG5lsJ3/sUu+rfU4Lto5ngUXr13szrp1SeiNta0WE4\nvjNM/hmODAXq+Eml6sD6opfTolgDbqwt54+TdorCBgF0nSlyJNYH6Tyi2SIO\nSvvoOpwKZlkqBvj52tHWsZDLfhF7Unxt6OcAwWy98SaqbbVSBrM9eOabn0r3\nQHUiSISEgIujQ1L0XEdiBkR9RvBulrjeC6bkQuKL9eR7VH9zacs9dCGJDgBk\n50q5ideV/DlNAeYN56rZIcx/G+yVcWfaddnERsL1Y/X2YxboIY3EZ8n59HpP\no9iK\r\n=PPcO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD26glBIg3Begx+z1XYjO+QhmS4xYblDcnwolzNt2UAKQIgPOw5DPWNalTasmyC5L3f1iySjCATCTv7i568yxokKsg="}]},"_npmUser":{"name":"kyza","email":"kyza@kyza.net"},"directories":{},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nests_4.0.0-alpha.11_1644049004849_0.675742502190922"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-02T01:00:51.504Z","1.0.0":"2021-09-02T01:00:51.648Z","modified":"2022-05-10T12:58:00.360Z","1.0.1":"2021-09-02T01:02:23.401Z","1.0.2":"2021-09-02T01:12:00.340Z","1.0.3":"2021-09-02T01:22:10.254Z","1.0.4":"2021-09-02T01:32:04.384Z","1.0.5":"2021-09-02T02:45:14.090Z","1.0.6":"2021-09-02T19:37:51.422Z","1.0.7":"2021-09-02T19:56:56.121Z","1.0.8":"2021-09-02T21:36:23.536Z","1.0.9":"2021-09-02T21:38:55.231Z","1.0.10":"2021-09-02T21:44:34.088Z","1.1.0":"2021-09-03T15:57:28.353Z","1.1.1":"2021-09-03T16:03:22.935Z","1.1.2":"2021-09-04T05:11:57.952Z","1.1.3":"2021-09-05T07:23:08.488Z","1.1.4":"2021-09-05T07:31:08.931Z","1.1.5":"2021-09-05T08:12:29.452Z","1.2.0":"2021-09-05T19:50:18.096Z","1.2.1":"2021-09-05T20:00:41.070Z","1.2.2":"2021-09-06T03:52:45.410Z","1.3.0":"2021-09-07T00:44:46.566Z","1.4.0":"2021-09-08T05:13:17.188Z","1.4.1":"2021-09-08T18:21:18.887Z","2.0.0-alpha.1":"2021-09-10T01:37:03.157Z","2.0.0-alpha.2":"2021-09-10T01:46:13.758Z","2.0.0-alpha.3":"2021-09-10T02:11:02.734Z","2.0.0-alpha.4":"2021-09-10T02:12:55.001Z","2.0.0-alpha.5":"2021-09-10T02:14:56.335Z","2.0.0-alpha.6":"2021-09-10T02:21:51.989Z","2.0.0-alpha.7":"2021-09-10T03:50:02.871Z","2.0.0-alpha.8":"2021-09-10T03:56:06.005Z","2.0.0-alpha.9":"2021-09-10T04:04:37.130Z","2.0.0-alpha.10":"2021-09-10T04:13:46.801Z","2.0.0-alpha.11":"2021-09-10T04:23:31.613Z","2.0.0":"2021-09-23T21:32:04.467Z","2.0.1":"2021-09-23T21:53:53.175Z","2.0.2":"2021-09-23T22:21:11.970Z","2.0.3":"2021-09-23T22:28:40.605Z","2.0.4":"2021-09-25T02:55:20.266Z","2.0.5":"2021-09-25T20:56:57.535Z","2.1.0":"2021-09-26T20:41:50.910Z","2.1.1":"2021-09-26T20:52:00.327Z","2.2.0":"2021-09-26T23:43:22.486Z","2.2.1":"2021-09-27T00:01:55.305Z","2.3.0":"2021-10-15T14:02:08.619Z","2.3.1":"2021-10-15T16:29:54.322Z","3.0.0-alpha.0":"2021-10-19T04:44:48.901Z","3.0.0-alpha.1":"2021-10-19T04:47:31.204Z","3.0.0-alpha.2":"2021-10-19T08:24:20.180Z","3.0.0-alpha.3":"2021-11-26T23:05:52.635Z","3.0.0-alpha.4":"2021-12-07T05:45:48.204Z","3.0.0-alpha.5":"2021-12-07T06:19:54.163Z","3.0.0-alpha.6":"2021-12-07T06:30:40.422Z","3.0.0-alpha.7":"2021-12-07T06:58:40.988Z","3.0.0-alpha.8":"2021-12-07T07:17:00.628Z","3.0.0-alpha.9":"2021-12-07T07:22:50.815Z","3.0.0-alpha.10":"2021-12-07T07:27:57.654Z","3.0.0-alpha.11":"2021-12-07T07:35:02.420Z","3.0.0-alpha.12":"2021-12-08T06:47:13.993Z","3.0.0-alpha.13":"2021-12-08T06:52:29.517Z","3.0.0-alpha.14":"2021-12-08T18:44:15.372Z","3.0.0-alpha.15":"2021-12-24T08:29:30.724Z","4.0.0-alpha.0":"2022-01-15T05:57:04.149Z","4.0.0-alpha.1":"2022-01-18T01:21:15.288Z","4.0.0-alpha.2":"2022-01-18T01:51:53.403Z","4.0.0-alpha.3":"2022-01-18T02:13:37.458Z","4.0.0-alpha.4":"2022-01-18T06:33:04.592Z","4.0.0-alpha.5":"2022-01-23T21:02:52.285Z","4.0.0-alpha.6":"2022-01-23T21:39:37.152Z","4.0.0-alpha.7":"2022-01-23T21:49:13.447Z","4.0.0-alpha.8":"2022-01-23T21:52:15.774Z","4.0.0-alpha.9":"2022-01-23T21:59:19.828Z","4.0.0-alpha.10":"2022-01-23T22:01:35.657Z","4.0.0-alpha.11":"2022-02-05T08:16:45.052Z"},"maintainers":[{"name":"kyza","email":"kyza@kyza.net"}],"description":"Fast and easy state storage with a lot of control.","keywords":["flux","redux","nests","state","store","simple","predictable","easy","deep","react","immer","solid-js"],"author":{"name":"Kyza"},"license":"MIT","readme":"","readmeFilename":"","repository":{"type":"git","url":"git+https://github.com/Kyza/nests.git"},"bugs":{"url":"https://github.com/Kyza/nests/issues"},"homepage":"https://github.com/Kyza/nests#readme"}