{"_id":"@andrewmat/hooks","_rev":"9-3eaf6737c49b58c283ddc364077b3f16","name":"@andrewmat/hooks","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@andrewmat/hooks","version":"0.1.0","description":"A collection of React custom hooks that I've developed","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"keywords":["react","hooks","utils","random","cache"],"author":{"name":"Andrewmat"},"license":"MIT","bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"homepage":"https://github.com/Andrewmat/hooks#readme","dependencies":{"react":"^16.8.0-alpha.1"},"gitHead":"12a975a2e25e3a8ed33b0482e6437b8560b59f66","_id":"@andrewmat/hooks@0.1.0","_npmVersion":"6.1.0","_nodeVersion":"11.8.0","_npmUser":{"name":"andrewmat","email":"andre.m.santos1@gmail.com"},"dist":{"integrity":"sha512-vSmsy9YeQmAjsbbnuY/tGencmDI4kLqD8c+LCZz5mV2MiY7ok8H8M6Vntpu/jUG0L4uNhWUqyytFgw6/j7B3fw==","shasum":"7f7060cfb36ae19017940cfa3ce8f02b6980492a","tarball":"https://registry.npmjs.org/@andrewmat/hooks/-/hooks-0.1.0.tgz","fileCount":11,"unpackedSize":14798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV0gYCRA9TVsSAnZWagAAl1QQAKA1OiD4+haTfQQDS4xG\nRoMaeelz14eueqcWxvbImI0HOKydOYcgZ+HQqcabpqy+t48jwKSFJIc14kU+\nI9Zc+8LbN5n2iXIDDW2QMopfj8y5cVQqk/6NyL5oC2hu3O+4r8VKRsNhGjFy\nA+qI9QABxGo48S71HLPIVQGXeLOy2hZ/b464Gc76TVLXwdjCcJSkf2qaNuek\nU9iMGEKDXWjTZGSFWPjwVddIoGFHB7zU7Eugn9fxL/yuVnhHuE/ZT1vev9hU\nd/hEt8MrL4N6eG9BUKeHlH0X2Xt1yXrBG3JGsjtKkP52u8DE5W7qPCBl+suK\nKchMike7p7rABnSFjgYvcMjpP0TGvDLPDI02rvbXwVM5h63I+fLcLojtY4qV\nUbbUQ8sAvvEMMtSy0sBKlSvXjx62hZvV8qMELua8CfoAowD5Lu1iMv4oLx2e\ncyTsIHitUHeDkhAItrQ5uQ5RxtN30w46yjIzHcIe2DWxw2iKdKKyJnAHY6AV\njejL1PK/STXVHcwehCz1O+pClUNYfFq9OLRXOfYYoDWvmNjxEQerd7qOP71K\nT+3OOSNts7UIE2M/ZdqFcCRrwPmBURBk39qCXsahpT95bi9kKkRB70jaUgeb\njZMn9YYFHeyamU1NQlmI2GtQxdZAzCwBnTXkIlWfJmozV5PW/9F70lJqvLlY\nO+mS\r\n=uJKE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC80b/vZ47ZOvXcXWBSwoxHGRSJnSNm1dee8xGw2dM32gIgNfGQi7P/AGx+EsvYs5qa/CGkiaWyY7xCLHbh3ny+1dA="}]},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hooks_0.1.0_1549223959645_0.15608177436322834"},"_hasShrinkwrap":false},"0.1.2":{"name":"@andrewmat/hooks","version":"0.1.2","description":"A collection of React custom hooks that I've developed","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"keywords":["react","hooks","utils","random","cache"],"author":{"name":"Andrewmat"},"license":"MIT","bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"homepage":"https://github.com/Andrewmat/hooks#readme","dependencies":{"react":"^16.8.0-alpha.1"},"gitHead":"5f2715fbcbf873ae2648db1b682e836a6c3180ee","_id":"@andrewmat/hooks@0.1.2","_npmVersion":"6.1.0","_nodeVersion":"11.8.0","_npmUser":{"name":"andrewmat","email":"andre.m.santos1@gmail.com"},"dist":{"integrity":"sha512-8mkgpK+J/KPP9SDLOLguMobDdQoHybzBWyvrxPcLPwRv6boLg1VA699Sx5H1ZXr8UbZUPl9vb9Yl/PFJDp8vCA==","shasum":"0094c99f6775860a4775b73cbef0ce93a676077d","tarball":"https://registry.npmjs.org/@andrewmat/hooks/-/hooks-0.1.2.tgz","fileCount":11,"unpackedSize":14822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV0rUCRA9TVsSAnZWagAAP0EP/RXZdgwukLy2U0xHMSw+\nzfO65/tfxp6h76rawitUD55XvU60K8Tz3cxE3yKmpr43soCzB60rm6N8KfAT\n/J40P4Y6FGfa9ftE/dST2TSg9sXaIfghEruttkuDsnepLduDyYeBZDdyQ7Ky\n4WxRbYBNXB/qrIBS2kAuSGXL5PFbZmKaR8r+llAMWjVLiMt9WIv5QeDguY2E\nWyi59guIFlsxd+cPaMDCOtl+S9gL2LvP10SFcBpRK1N2dZU1QDPQoV7tS6Iv\nXe6kyiRHaoqmup23EhZUe9qDlkpa+2xBefozpuF25TihKXbJWRHI1lYE8noy\n4DZSJ8SbCQynuSUnxqRsqNnMOn3EzKxFapHpKx3NNAkCvKOgz0tevrpktWwm\ntKWqPNqntbj5/QqlxJHUZNJdt8CqPG4xUD3rHcX/EisfZ4TcLlUgdh6pjVEO\nk/aTG3aYGRcMhhhBDnQfkeXclw6W7us46/KZbNSO6eoK6K3l+kaXFPaY61CO\ne6qXoSK+LkBBZ7w9jlbj0RyStUZAtw7NTvhIrhSiKQEZHDAI5b5KpYgXq63e\nvBZzk79g+Io9xc7gCPF/C9tlGKIf9R57hT8IJyCctSAeBGdyBhN9b15d0be4\n6uiPHmx6k9nlh5kLfrWbzbCvvtk72P8HCrlOWjkpPVdSlR6FXAM7g4ffIhHE\nmS42\r\n=uFcw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNGsi9qYlJfkvmxWJsjDLGREWvpw8Mw6JoYau6Fy6VQAiBlqLRblyDPGOdf9y2SUGbh5merKUrSi1b/gmNJNId53Q=="}]},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hooks_0.1.2_1549224659445_0.19353915314887105"},"_hasShrinkwrap":false},"0.2.0":{"name":"@andrewmat/hooks","version":"0.2.0","description":"A collection of React custom hooks that I've developed","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"keywords":["react","hooks","utils","random","cache"],"author":{"name":"Andrewmat"},"license":"MIT","bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"homepage":"https://github.com/Andrewmat/hooks#readme","dependencies":{"react":"^16.8.0-alpha.1"},"gitHead":"3f0cc1d8deb3dad211d1bbfed8592454437edeb9","_id":"@andrewmat/hooks@0.2.0","_npmVersion":"6.1.0","_nodeVersion":"11.8.0","_npmUser":{"name":"andrewmat","email":"andre.m.santos1@gmail.com"},"dist":{"integrity":"sha512-pDqhqN5SQut3KfQPyxpwkAaBQJe0Jslr6AW2V9WP11Y3Ib98WQxU9MCDpNFctGotKJ5Hg7IO9vmx9gg1lEOojg==","shasum":"5e17b624d432ded3fd5b3f6aacdd74cd5a091cd3","tarball":"https://registry.npmjs.org/@andrewmat/hooks/-/hooks-0.2.0.tgz","fileCount":11,"unpackedSize":14778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV0tcCRA9TVsSAnZWagAAcPoP/2F2uWPj1EXRezNGoI66\noz22G6fazbJTnJia9hVWC+DbLwupwo9DEy0Iri+e9v4gD1ObZ8bq3UWG58dH\ndKw+3nRhk54bWwyKlRY4orjfcbmjeW/tXgvD8mXjjE4c1Pm3KHpmNNyLwNku\n5NUhmt1szGr+vyTVVEnPiu6S6zno6IRW+AjlMRVS58yiNUCfnw3gZmlOwlNm\nWxIRjPZPVPycvsePtVQzCCKKTkE9b1xtQODH84A0sv/PF1tbzj2QOw9JoIj5\n74ptN6VLkVepfkG0x1/Gyi35edanwKsGAM2bhDu+tYac1iuoyD52qQlPjeY+\nf6lzVZUZ7nn+CcNgz2rhBaGlj2ZTnePlP6RAlFN3yk0vPUz9GmOhOTQpZl2k\nXsbLaqk55C+beok540tTtxRhFLZlDBJJQXF7rzma27TAayMDxKPqR/t/D5Ai\nO/8yMieOkxo2dIrhTIUG6nYUlXPOy5QNAruJaNxQWxSfqXUcYa69N7NoH9Yz\npV4qj4T4Bity9VO+HVoUkBFbQanoKbpOoGbokgSqF86Hx/HCEfQr8hMSp+Gh\nQFKZJ7/nk+S8Shsdn2rngwuJnkByYNbVpzoES+88uVeyvEy2Ps9QsQyEYOv6\nCCeY4XQfIWHUYlCF4bVL0NDGSgkGTUcDiheL5i+8AC0s18oJ4zUu0umJuyas\nGamC\r\n=383z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwA04tr1Js2SyJVwmIOBWJroZ/HGS/0eA0B0E9Hlpy6QIhAKaWaNJkWmhX+/onjGmmEMtBJL/crj3o0eANG2vNsEW9"}]},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hooks_0.2.0_1549224795344_0.579827405577324"},"_hasShrinkwrap":false},"0.2.1":{"name":"@andrewmat/hooks","version":"0.2.1","description":"A collection of React custom hooks that I've developed","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"keywords":["react","hooks","utils","random","cache"],"author":{"name":"Andrewmat"},"license":"MIT","bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"homepage":"https://github.com/Andrewmat/hooks#readme","dependencies":{"react":"^16.8.0-alpha.1"},"gitHead":"eca5f05df031b09d54eb9e5a61a67b87597b118d","_id":"@andrewmat/hooks@0.2.1","_npmVersion":"6.1.0","_nodeVersion":"11.8.0","_npmUser":{"name":"andrewmat","email":"andre.m.santos1@gmail.com"},"dist":{"integrity":"sha512-yk159K56pnGx7BsRjYZYSoIvtcs06DrCJ2FVHUtFTzVIeaHXPlZRNIbdiIJa+fF47ImFQaPgFaqJLxcgrnYxAg==","shasum":"2b95b5c772419847e1d11a4af6a84573fb861bd7","tarball":"https://registry.npmjs.org/@andrewmat/hooks/-/hooks-0.2.1.tgz","fileCount":12,"unpackedSize":15314,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV0xNCRA9TVsSAnZWagAA9yAP/R+1huK5uxqjAvpuhXaW\nAXuGdGAQKaEVy23V38fm+/sICA55sCmAVLedwwGmPLw2BQ7ImY2g7IDENkCU\n7OM7c36FwK3+g59/pBedHOwIw/dRaXKPLobf+YXKuuwRkj9boLmJbVLyL06F\nxaP7s0giaKgngug6qCFP/+D8/UNzXI9LKUGrC7FjjBA/QCjCjTI18Nlau+cr\nBJNkUCqfAf3DooquxyFxZe65Mi+e0ibwlbMEyfyhRtbbr7BI084WtqRPfAC3\nYUdrpXeho5ydNCmJsnGWJCbArig+Qt32+D6xDNRW9lOSZLzqUZND+kqEZO29\nXaUHqFSOos+RSTl/er11aALmYS09veGmJYnAFMuuD1kvc8quV1v1pH4PpskZ\n32daUcMKagUHIOLA0S6ka5nR36meKbwWBz5Bnof+aUm5rpb+eAqJVh8UlULP\n4E19RuaGggsfq+ql9WWmUr27wg0uFCuQfiMpFjVtkjWnl6A1dBDhscikdo95\n8PytY/jeWa+N+vjn+/otA1ssCLFotLPo5Jwqhji3XC6V7aho2CPNWxQ5kUnC\ndckBD0I1ONg0wDHKsEdiu9mo41nRwicBC9Ss8lx8dGezoEVNGDLhQUKIXdSj\nbjwAIWYPXUwhPum80w6i5B8tGamVvZQZy1t1WK9QIAlsBKTl6CryYsE/ehSU\nCFVL\r\n=+qmJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBhDBXw2M9a8iBlGBWm6boNcLaxX27SA7kjEoMfdrp5OAiEA0VMTDPwMtMDk9GLZhUzAeiiH12ameCEwMkt95e970kA="}]},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hooks_0.2.1_1549225036481_0.8801999246485686"},"_hasShrinkwrap":false},"0.2.2":{"name":"@andrewmat/hooks","version":"0.2.2","description":"A collection of React custom hooks that I've developed","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"keywords":["react","hooks","utils","random","cache"],"author":{"name":"Andrewmat"},"license":"MIT","bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"homepage":"https://github.com/Andrewmat/hooks#readme","dependencies":{"react":"^16.8.0-alpha.1"},"gitHead":"8342d91268feb2298abcc45d0014bd256a1c1468","_id":"@andrewmat/hooks@0.2.2","_npmVersion":"6.1.0","_nodeVersion":"11.8.0","_npmUser":{"name":"andrewmat","email":"andre.m.santos1@gmail.com"},"dist":{"integrity":"sha512-xSZI0zpEHmL34DJ71KwALbK0GfpJmUApWs6587wE5ctc28TRpjGmW5bJREZ7QFuejFIC13MAvAWMIcwZ/wRrEw==","shasum":"280271658af64f884baa46a29f317de8b4265ee3","tarball":"https://registry.npmjs.org/@andrewmat/hooks/-/hooks-0.2.2.tgz","fileCount":12,"unpackedSize":15426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV01nCRA9TVsSAnZWagAAOCkP/1IhqHq50NW2MimA6meC\nWZN2OhzxEzSNXOdaxDH7WXJpps4CtRguYBf3J2hnecNF7OxwJmwzvlTTJc8A\n5fNvb0vQu2FhPlDcNEXtek4r/T4locGzCF9X44TQiWYJfwb5XyMMAXMCGHJa\nbet51P/VaS2ZMlYqhWEHYyEnxplx+yQYQWdWwx/ss2EOKZKHvysvQAKuK0K5\nefVvFgptUAj6tz3HqK7WKX54bqCY1sS+E/2runC7J0gyurGecjn0mgkjZYm6\nbC2hPTYfZBhP5HiZ2tcnIsigf1Rx/I0lyvzLohyNB8Sq5tJW4qFM/7r0sj9d\naecUqGdAmgU4D8/pjbJqOCL2KxwBTYlwarQNmzcXk7I4BsGojvE5f7DB0k8G\nggAkw5EHtX7qZajjNrVTGX7nLDXfBIpvziofF6N9Ha7LA538mT5m4OW41pZn\nt0QMKoiTeZdDHzTM1CDuEk+zMJ6EdINWQfDevE9Cir75Ns6dRnJz+aNOAA6o\nMvuBFl9DBVJtATh49HHBG0jyCFIqth4eN9h7ddYAxoBeLTbmcF+DHjY99LMa\nv6ZQb51VF+U5xv1qGWLtv8khLtF4zWONAk4nbgKKq3i3AgdaPjkwNCRAcAUk\ne+LrZe4FZ4Fkf2VCXlgnHU0OKiEIgMbTRrkCfnX7XQtFoqxNbYy5tFJsW95r\n8mdu\r\n=y0u3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBc910bpdrDRuf4HJrEFiEJKlFcoy+VBXQ5rJjPYfeH9AiEAysJFyG4+MMU1GxameygOOipTQCZOEA+WOioDwC6lXSY="}]},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hooks_0.2.2_1549225319269_0.9007051054940922"},"_hasShrinkwrap":false},"0.2.3":{"name":"@andrewmat/hooks","version":"0.2.3","description":"A collection of React custom hooks that I've developed","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"keywords":["react","hooks","utils","random","cache"],"author":{"name":"Andrewmat"},"license":"MIT","bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"homepage":"https://github.com/Andrewmat/hooks#readme","dependencies":{"react":"^16.8.0-alpha.1","react-dom":"^16.8.0-alpha.1"},"gitHead":"3b585a40b86340592f85e90c42b0143305fc703c","_id":"@andrewmat/hooks@0.2.3","_npmVersion":"6.1.0","_nodeVersion":"11.8.0","_npmUser":{"name":"andrewmat","email":"andre.m.santos1@gmail.com"},"dist":{"integrity":"sha512-/9apv2gbMhru6demQriEWKdqbfVdaGEbsBLp18ijEN4H8MTR4Yy0U/iJ0mGtZhI2x1YRaKGkZECePiYgVBLkog==","shasum":"4f43ef792fbf98ee7c7c8fcc920a6ea82d08e1cb","tarball":"https://registry.npmjs.org/@andrewmat/hooks/-/hooks-0.2.3.tgz","fileCount":12,"unpackedSize":15885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV1PVCRA9TVsSAnZWagAA9BMP/0aqONGbobbhK46f4fLG\nyt001FoRUR5tCAXaDaj1XckQBXarKiuJZ7jqCYc8yys8H59qv8cCSmqnU7hK\nUvpP4wSLauNGiqvrjVU3cT0XMMYS8jCwbFMk736tmJn6VAC+Tf2KoY60SxKf\nKJIFtQOJvuMCCEHiNTuKMyqtNBrKm4SQ2XQQfJonHmy2OoWx4ty6XYz0H/mB\nUP5D0mNgxDZPrTl7e4Yvn3iKxiU5BFKwNDhlgrnzxnLfip6YXpnJcbradNAt\nPhHjj28NpAyynQsUKdTpOdNiF8X52goqbqBjeYwDDpwEyUA3H5gOJLkS5haF\nE0ZePzRJD298GwMjAnirm0QVMdYWeG2XYHxge1CeVAnedFVgCFj8f12z00hd\npzgDs8Jb7GtAjwgW69XRkWFZwblApiiXIhyyVBHm0RxCNUquOqamX+7qNH9i\nCT15p9FDExaOnX3cg8vxiqcX2TH81AdSCZ0Y3Wgj7B8fembXHFPFyq0l2Eos\nrKDwCV4xnXKlxZ+RRyCpOr4vJnAdx+GPCIu1PJiT+QHgXFJsEOMkZbKXdvQC\ngXXZbDZqBu4eV6XETMgeeZqT4Ue5hdcNCiX6grLzwePUhar818i90ztU4Pq1\nmhFE0g0Cxpmvrj52OeigyYMrYRFv9fhpTsTFuPvgmo1SaQEW5C4rduMvyCDG\n3U7d\r\n=ZtXn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD72al5fdQ28dP25MPdYsex2wf6BbFtJvwosQMau9OMiQIgT8r6/PT8VrwWpGNgzZNGkZUuVIQX+G0Zyl3gIUcV2tQ="}]},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hooks_0.2.3_1549226964768_0.9701253661012408"},"_hasShrinkwrap":false},"0.2.4":{"name":"@andrewmat/hooks","version":"0.2.4","description":"A collection of React custom hooks that I've developed","main":"dist/index.cjs.js","module":"dist/index.es.js","scripts":{"build":"rollup -c=./rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"keywords":["react","hooks","utils","random","cache"],"author":{"name":"Andrewmat"},"license":"MIT","bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"homepage":"https://github.com/Andrewmat/hooks#readme","dependencies":{"react":"^16.8.0-alpha.1","react-dom":"^16.8.0-alpha.1"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/preset-env":"^7.3.1","@babel/preset-react":"^7.0.0","babel-loader":"8.0.5","rollup":"^1.1.2","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.0.0","webpack":"^4.29.1","webpack-cli":"^3.2.1"},"gitHead":"e17e768429e902a8bb9ea5aa3ed7fca6336a89d2","_id":"@andrewmat/hooks@0.2.4","_npmVersion":"6.1.0","_nodeVersion":"11.8.0","_npmUser":{"name":"andrewmat","email":"andre.m.santos1@gmail.com"},"dist":{"integrity":"sha512-83X6zNtu3yuQOgemekWzctV33VzRHrodsp3RE9mxNt9ZRLeyYFePNx7SCyDEJnQmtPyYR835UZigqPebiw1Rww==","shasum":"a431b3055ce12da891ad178141e7c8be0f0638a5","tarball":"https://registry.npmjs.org/@andrewmat/hooks/-/hooks-0.2.4.tgz","fileCount":10,"unpackedSize":478710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWOC4CRA9TVsSAnZWagAAawYQAIKdJlNsOOipALOEJH8r\n5I7BwnJ9Fo28f++p4pzAbObo7T3fTrF7fmQWjO5aNcKlaux0eKxl5VXgKB4Y\nLJfHRuzLD4/G0d2UZkSlAFvNVfba9lPMcFDfVxNgoRQM/z+h+2IJZl5J4FVr\nlSFdB9QS4zHUXsPgYzmeW1taspu4zw1B01Qjt110xU3DznvpRICv3BhMIsiw\nMl8m1XU+ZTjKQCnNGw1+r7/id4wLY5RFqpC4Zhri7P8faXNsBw9l0JWAGxmH\nWlNMfxP3jUUS4c/4DCUx10vJCLXyz0Xibl5ib3EESw+9kmrJko7QYeuhEo6E\ng8yg3gsHCe/BTjC2+2WMo/AP9wQy6obObaIBF/jtKyOCTFSQBKgXlhcXd2Y4\n1SJzcl9idEBANwxRvXv2tSlGi4xgHak0sRKi+8E/zSZzD4XqdMKme5f6ehWP\n6qcxApg9LTS6NjnCbDlAhUApbo5vmxZx4SXoxk5F533gIc/mGxQ6UZRxk6Vb\nnzglPRj9It6PZRWBwxJRbxB+2elxfhcoXrgya3JOasgMO8yxvZdbdDdokjvd\n335PzcMV4LwgWnmwbQJ1MXi7+SNMa+RAaQ5FkNDcZyFxb3R4xeaXs5jPTva9\nEZWBmK+bFoid0VYDyrFyJaPcvL93Shu30ki8uwk5FCWq6Do4MOLLTPCePY2e\nQeJG\r\n=58yV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDr+DRMiLYDVFgPwiMXRxedyV2uzu9w3CIrYdodHG0W+wIgfAIU+9vVZGgEgyZKNA7CMhAOVh3UOYXNvK+wWyqVmIY="}]},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hooks_0.2.4_1549328568145_0.7023660046548363"},"_hasShrinkwrap":false},"0.3.0":{"name":"@andrewmat/hooks","version":"0.3.0","description":"A collection of React custom hooks that I've developed","main":"dist/index.cjs.js","module":"dist/index.es.js","scripts":{"build":"rollup -c=./rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"keywords":["react","hooks","utils","random","cache"],"author":{"name":"Andrewmat"},"license":"MIT","bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"homepage":"https://github.com/Andrewmat/hooks#readme","dependencies":{"react":"^16.8.0-alpha.1","react-dom":"^16.8.0-alpha.1"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/preset-env":"^7.3.1","@babel/preset-react":"^7.0.0","babel-loader":"8.0.5","rollup":"^1.1.2","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.0.0","webpack":"^4.29.1","webpack-cli":"^3.2.1"},"gitHead":"972974781857a5778e86166378879027f50893d5","_id":"@andrewmat/hooks@0.3.0","_npmVersion":"6.1.0","_nodeVersion":"11.8.0","_npmUser":{"name":"andrewmat","email":"andre.m.santos1@gmail.com"},"dist":{"integrity":"sha512-sa/EhVLLRvOFzkAXPe6iY8IOolOvP0Mt0qqgFZKvLMcY9994U4XOIhIAhujrE/GWJABQ2GrLkHHTQ3pT8itGnQ==","shasum":"0c0d06cfa215712c6f8a14a2b483a2375202af3f","tarball":"https://registry.npmjs.org/@andrewmat/hooks/-/hooks-0.3.0.tgz","fileCount":10,"unpackedSize":478744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWOaMCRA9TVsSAnZWagAAqLYP/1AK3lnjahTZYt4r1Vxg\naQEIYYU6ETBXrk9+RN9PUFp48QVp/00I+uF4A3fu5tkoU+fObXqShQThZCu4\n88T+797pl5shRRN1i7aoM3YbFPqezVMa+7cXAKkCz4yEXEZ+FYzBTnlfny7/\nmWVIIDlfHyy5tLdnvt8ZAUFDVRy6GpKIu3ZDf89LZAeiyNUYMKcE712qupxT\nSBixmvMyazsL/ze0J3vdKjlBpZnzLNe+eCLrwKC2oscEwsBUUCtBpcnq06ea\nrFPz6q9ZxY30RQIOydUERluvCX8uH5WsYaqzUw0hBhklAvwLsNtIo+vqgSAw\nxlZsy2GGKh3WojrTA1x46y/MMqbsqsjI3AfddgKpJ8p8WBMnims/ORkge+4X\nl/14jsodAIlf1eHHsp75oXe0Z3HHOsUPT0DDrItEHKr+1IVzsihb36LGXrFF\ng0fU/9uLgGycmCroLGBRvCWFd9K/zw0Jbm9GtfzjHlXcCdnBThYKVNhymVjj\n7RSrqC1S+N+RiXgutEGB1YsS5x0Q+I5YNgU2M6mruz2OYKF1cpVGgVgY8uBz\nKxgrCxbzx7e0nGdCqvkDZWMiANBs+ZxrWuWPjQGaD71+/TUuQllMRYRYgZwN\nhfz896t7FKJxCJprtS86/XK6zRdfJd4d9XOwOanpQkg1QHoJNvNn/M+DCLE0\n06Bk\r\n=lqPz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDPzEJqGpUgrjrufT+RJBq4ps5uHW7P59YuQ8RnhyqXQIgb5VbVv9iKsomHBU5NEb1DJFzbshe8O1DDJlJsn4KU7I="}]},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hooks_0.3.0_1549330060172_0.6613520067903536"},"_hasShrinkwrap":false},"0.4.0":{"name":"@andrewmat/hooks","version":"0.4.0","description":"A collection of React custom hooks that I've developed","main":"dist/index.cjs.js","module":"dist/index.es.js","scripts":{"build":"rollup -c=./rollup.config.js","lint":"eslint **/*.{js,jsx}","analyze":"bundle-phobia -p ./package.json > deps-size.txt"},"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"keywords":["react","hooks","utils","random","cache"],"author":{"name":"Andrewmat"},"license":"MIT","bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"homepage":"https://github.com/Andrewmat/hooks#readme","dependencies":{"react":"^16.8.1","react-dom":"^16.8.1"},"peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/preset-env":"^7.3.1","@babel/preset-react":"^7.0.0","babel-eslint":"^10.0.1","babel-loader":"8.0.5","eslint":"^5.13.0","eslint-config-prettier":"^4.0.0","eslint-config-react":"^1.1.7","eslint-config-react-app":"^3.0.6","eslint-loader":"^2.1.2","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^6.2.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","eslint-plugin-react-app":"^4.0.1","prettier":"^1.16.4","rollup":"^1.1.2","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.0.0","webpack":"^4.29.1"},"licenseText":"MIT License\n\nCopyright (c) 2019 André Matulionis dos Santos\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@andrewmat/hooks@0.4.0","dist":{"shasum":"d406c4631624eea947648c9793a9d1625734333f","integrity":"sha512-TkwdNQxt/os+9UQm5QFzwj/krLd6Y4gJ6bqNPYc2WgxjsGs1G2qqMuAvZHcETcKlBkV800bUmxc7jMNCcpAptw==","tarball":"https://registry.npmjs.org/@andrewmat/hooks/-/hooks-0.4.0.tgz","fileCount":16,"unpackedSize":63187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcW3G7CRA9TVsSAnZWagAA5pUP/jqtkAJw/LCRS4zwWO8g\nmXvlgdLevWbxBzivBSAhtzgn4PD7UDIzoSpGf9nWiWBmYkb6zD8Ygy4rQU6R\nSzKw4Bq6dFL2PbejKDYuie8FVGeSgPn7iKgH9OvPqaA17IKlm92dtwv72QYs\nBRS9NugZQ05vPjbSgptfD8g4/Y/Wv0hkJJfCakBsX9XNpee67Ws2j+B4PjwN\n9N+7db1s9lXN6NGEfcRb32a9U7nzU00eZi0ppIMfLIcdiUlfghHVPUElc0Rs\n3p2KDEFjs6RRfRs3C92i6S9Uv4kwkY6KdJ74E1PJY0KhPdt0BAGKJilGMBYb\nQMHaY/FrUg3TFgl0OcXmDkwL3Hen884A2yghwEN2oPb4uOz/1A0Pz4uVSwpI\nfzIsbkxGMp1VIYBfNl8g6eB3vFL9IXhoyLuybbG/8ULo9Z9ra+h9s3p/pgjG\nFNvphALi9gpOSUkx4EW0AI37UcpPiiaOz6EsaOvKG01KZhIYfRvL4wKaupwH\nNdCL4oATwlQD6us8JM/HyTEdrh2pCfoWc0I7UWrddmAUAy5JAe/DsWavgZmL\nINzWMjlUV2v0RGG7LweJrl0dgjd+fUdYAMqji+Y95IZikQjJhxZU9jIXTV44\nhqj+0H4Soxa+9qoocT/YjOhaPd/Ra7K3nDUEHBliFk4KHS+Xj9xc4XxT+O1A\nQi5t\r\n=WIVe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQMNnQJdnVmylLwdwT72tQFiOh9ANl4FSuo2Ilb+zaKgIhAKTgkJfJBc2Ej/UiGZ/piSF1ycfwuLgAr3/MRAu9ZlIB"}]},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"_npmUser":{"name":"andrewmat","email":"andre.m.santos1@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hooks_0.4.0_1549496763298_0.22351162323256246"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-03T19:59:19.453Z","0.1.0":"2019-02-03T19:59:19.779Z","modified":"2022-04-04T14:01:44.607Z","0.1.2":"2019-02-03T20:10:59.613Z","0.2.0":"2019-02-03T20:13:15.452Z","0.2.1":"2019-02-03T20:17:16.609Z","0.2.2":"2019-02-03T20:21:59.390Z","0.2.3":"2019-02-03T20:49:24.905Z","0.2.4":"2019-02-05T01:02:48.308Z","0.3.0":"2019-02-05T01:27:40.344Z","0.4.0":"2019-02-06T23:46:03.393Z"},"maintainers":[{"name":"andrewmat","email":"andre.m.santos1@gmail.com"}],"description":"A collection of React custom hooks that I've developed","homepage":"https://github.com/Andrewmat/hooks#readme","keywords":["react","hooks","utils","random","cache"],"repository":{"type":"git","url":"git+https://github.com/Andrewmat/hooks.git"},"author":{"name":"Andrewmat"},"bugs":{"url":"https://github.com/Andrewmat/hooks/issues"},"license":"MIT","readme":"# Andrewmat/hooks\n\nI've developed some custom hooks making the SWBD project, and now I'm sharing it. Just that.\n\n## Usage\n\nAdd it to your project\n\n```\nnpm install @andrewmat/hooks\nyarn add @andrewmat/hooks\n```\n\nStarting using it\n\n```jsx\nimport { useCache, CacheProvider } from '@andrewmat/hooks'\nimport { useCounter } from '@andrewmat/hooks'\nimport { useDocumentTitle } from '@andrewmat/hooks'\nimport { useIterator } from '@andrewmat/hooks'\nimport { useToggle } from '@andrewmat/hooks'\n```\n\n## So... where are they?\n\nInside the `/src/hooks` there are multiple hooks that I developed. I'm avoiding using external package dependencies, and focusing only on the original React resources for now\n\n### useToggle\n\n**Standalone hook**\n\nIdentity:\n\n```jsx\nconst [value, toggle] = useToggle([initialValue = false, toggleValue = true])\n```\n\nIt stores one of two options, and returns the current option and a function that changes to the other option.\nAs default, it simply changes between booleans, with false as initial value.\n\n```jsx\nfunction MyComponent() {\n  const [myBool, toggleMyBool] = useToggle()\n\n  // button label is false/true\n  return (\n    <button onClick={toggleMyBool}>\n      {myBool}\n    </button>\n  )\n}\n```\n\nIt also can receive a initial boolean value\n\n```jsx\nfunction MyComponent() {\n  const initialValue = true\n  const [myBool, toggleMyBool] = useToggle(initialValue)\n\n  // button label is true/false\n  return (\n    <button onClick={toggleMyBool}>\n      {myBool}\n    </button>\n  )\n}\n```\n\nIt also can receive an array of two elements, and if so, it toggles between then. The index 0 will be the initial value in this case\n\n```jsx\nfunction MyComponent() {\n  const [theme, toggleTheme] = useToggle(['blue', 'pink'])\n\n  return (\n    <div>\n      This is the {theme} theme!\n      <button onClick={toggleTheme} className={`${theme}-theme`}>\n        Toggle\n      </button>\n    </div>\n  )\n}\n```\n\n### useCounter\n\n**Standalone hook**\n\nIdentity:\n```jsx\nconst [value, increment] = useCounter(initialValue = 0)\n```\n\nIt returns the current value, and an increment function, in array form\n\n```jsx\nfunction MyComponent() {\n  const [value, increment] = useCounter()\n  return <button onClick={increment}>value</button>\n}\n```\n\n### useDocumentTitle\n\n**Standalone hook**\n\nIdentity:\n\n```jsx\nuseDocumentTitle(title)\n```\n\nIt receives an title to apply to the document. It also returns to the previous title when the component unmounts\n\n```jsx\nfunction MyComponent() {\n  useDocumentTitle('Example Title')\n  return <div />\n}\n```\n\n### useIterator\n\n**Standalone hook**\n\nIdentity:\n```jsx\nconst controller = useIterator(list, loop = false, startIndex = 0)\n// controller: { item, index, next, previous, hasNext, hasPrevious }\n```\n\nIt receives an array, and returns an controller to iterate in this array\n\n```jsx\nfunction MyComponent() {\n  const myList = ['Alice', 'Ben', 'Charles']\n  const iterator = useIterator(list)\n  return (\n    <div>\n      <button onClick={iterator.previous}>Previous</button>\n      {iterator.item}\n      <button onClick={iterator.next}>Next</button>\n    </div>\n  )\n}\n```\n\nuseIterator also can received two more arguments\n\n```jsx\n// loop: Whether or not should the list loop. Defaults to false\n// startIndex: What index should be the initial item. Defaults to 0\nuseIterator(list, loop, startIndex)\n```\n\nThe controller returned by this hook is composed of the following attributes:\n\n```jsx\nconst iterator = useIterator(list)\n\n// current item being iterated\niterator.item\n\n// index of the current item\niterator.index\n\n// function to iterate to the next item on the list\n// returns the controller so it can be chained\nconst nextIterator = iterator.next()\n\n// function to iterate to the previous item on the list\n// returns the controller so it can be chained\nconst previousIterator = iterator.previous()\n\n// boolean that detects if it has a next item on the list\n// it also accounts if the iterator loops\niterator.hasNext\n\n// boolean that detects if it has a previous item on the list\n// it also accounts if the iterator loops\niterator.hasPrevious\n```\n\n### useCache\n\n\n```jsx\nconst cacheFetch = useCache(async function () {})\n```\n\nA hook to use cache to store resolutions of async functions. It uses the CacheProvider (inside `/src/components`) that creates an context used for caching resources.\n\nIt receives an async function, and it returns an async function that mimics the given function, using caching resources whenever possible\n\n```jsx\nfunction myFetch(id) {\n  returns fetch(`${apiUrl}/${id}`)\n}\n\nfunction MyComponent() {\n  const myCachedFetch = useCache(myFetch)\n\n  return (\n    <MyAnotherComponent onChange={myCachedFetch} />\n  )\n}\n\n// useCache should be used alongside CacheProvider\nfunction App() {\n  return (\n    <CacheProvider>\n      <MyComponent/>\n    </CacheProvider>\n  )\n}\n```\n\nIt receives a namespace as second argument. If not set, it uses `__root` as default, althought I recommend to always use it to avoid name clashes between diferent contexts\n\n```jsx\nfunction MyComponent() {\n  const myCachedFetch = useCache(myFetch, 'myNamespace')\n\n  return (\n    <MyAnotherComponent onChange={myCachedFetch} />\n  )\n}\n```\n\nIt also receives a config object as third parameter. The config object is as follows:\n\n```jsx\nconst cacheConfig = {\n  // optional function that generates key\n  // It receives an array of parameters and must return an string\n  keyGenerator,\n\n  // optional key of cache entry\n  // It overwrites the keyGenerator function\n  key,\n\n  // optional key to limit entries inside the namespace\n  limit\n}\nuseCache(myFetch, 'myNamespace', cacheConfig)\n\n```\n\nThe returned function also has a new attribute: `clearCache`, a function that removes all the entries from the cache of the given namespace\n\n```jsx\nfunction MyComponent({ data }) {\n  const cachedFetch = useCache(myFetch, { namespace: 'my-fetch' })\n\n  return (\n    <div>\n      <button onClick={() => cachedFetch(data)}>Fetch data<button>\n      <button onClick={cachedFetch.clearCache}>Reset cache<button>\n    </div>\n  )\n}\n```\n","readmeFilename":"README.md"}