{"_id":"@calvein/use-toggle","_rev":"1-a394209643d704202f5a19f88c580147","name":"@calvein/use-toggle","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@calvein/use-toggle","version":"1.0.0","description":"React hook for toggling things","main":"index.js","repository":{"type":"git","url":"git+https://github.com/calvein/toggle.git"},"author":{"name":"François Robichet","email":"@calvein"},"license":"MIT","publishConfig":{"access":"public"},"keywords":["react","hooks","toggle"],"scripts":{"test":"ava test.js","example":"parcel example.html"},"peerDependencies":{"react":"^16.8.6"},"devDependencies":{"ava":"^0.25.0","browser-env":"^3.2.5","parcel":"^1.10.3","raf":"^3.4.0","react":"^16.8.6","react-dom":"^16.8.6","react-test-renderer":"^16.8.6"},"ava":{"require":["./test-setup.js"]},"gitHead":"af8bf0b1fb96faed0316cc03928c5c12fc811d1c","bugs":{"url":"https://github.com/calvein/toggle/issues"},"homepage":"https://github.com/calvein/toggle#readme","_id":"@calvein/use-toggle@1.0.0","_npmVersion":"5.8.0","_nodeVersion":"10.15.2","_npmUser":{"name":"calvein","email":"calvein@gmail.com"},"dist":{"integrity":"sha512-1C23sBl3Hyg5qOETVmGVNVU+8DtDMTSLA7MEniDIVFk4RAZXkvsXi+CtWuDxWTnUZQaYZlDgkyz847zxbj5C+w==","shasum":"da5510715e9e5c371a06d6c0787d85becd6a8608","tarball":"https://registry.npmjs.org/@calvein/use-toggle/-/use-toggle-1.0.0.tgz","fileCount":6,"unpackedSize":2953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1udNCRA9TVsSAnZWagAAvNYQAIeDqU9vjv8OEVMhY5Kr\nOt6dEqwy3ttnXjv5R8URZcqJEupywSu8BZCXG4HurjRtuCz0Wnn0okJq14UC\nkk/MMcjgTtucFvvRv03c9A7uFlx33ovKKArIlQTf3YCGG7ubWHtjzaW3sgTU\nCtpm5gXS3twc/viCOMFlt740M9NcHCens1o+kel0sT+94BwxcKFPjqZOARUZ\ngkL3OcA69JqumQheKTKyI4iY3e7s0G+QBHgXDf5wMkvrc2Uo8vBRxzrbVbDs\nzFuo0tSDPAdre+3VdqhDpX/peupTSHlKKkoZZhRIp1Anqq02kBTwBDg8zQTP\nDFazgpgeQL/kfFWHsPEeq7TjoL3I7V7Mjc3r+8uuqKlWg94lv5z+xCogFleV\nGxXrUm+2ADVh4PhiNU4rX7TkJoqmoFYcO+b+SLbT44U4aDbfOw/cnvD7uT0N\nNTT0Cy0BBs4upLF0uK7E/aHsrfEYaG/rLgXzKCis0OyxWAO9Sp2da06AFqc3\n/HZhNlnH0FIVtnbalkJQcNQWH5GnZDqmjrJMuyy1v2MFumhrZshFzL8et+v5\n9/sR7UQ9kiF5E3hs7iMn5vGi8ViFNc4vUpDHIW/1iqZl/uTDhg1WateAV8ED\nFZXcPbKs5UFdeXHoPyEyu8+wVi0LTvASPNlhPSMU/jkg6cGpErKcaw2tCthv\nT2L9\r\n=wj88\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOoAa3Umvou/WK2oKLk/pfnWvJwHFVbqgDTg8bxQJPIQIgJtexpz9qsbc95ZxCOF4+138eqozBq0yYCfHaq+si5SE="}]},"maintainers":[{"name":"calvein","email":"calvein@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-toggle_1.0.0_1557587788815_0.9299285277139355"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-11T15:16:28.784Z","1.0.0":"2019-05-11T15:16:29.059Z","modified":"2022-04-04T21:33:32.546Z"},"maintainers":[{"name":"calvein","email":"calvein@gmail.com"}],"description":"React hook for toggling things","homepage":"https://github.com/calvein/toggle#readme","keywords":["react","hooks","toggle"],"repository":{"type":"git","url":"git+https://github.com/calvein/toggle.git"},"author":{"name":"François Robichet","email":"@calvein"},"bugs":{"url":"https://github.com/calvein/toggle/issues"},"license":"MIT","readme":"# `@calvein/use-toggle`\n\n> React hook for toggling\n\n## Install\n\n```sh\nnpm install @calvein/use-toggle\n```\n\n## Usage\n\n```js\nimport useToggle from '@calvein/use-toggle';\n\nconst MyComponent = () => {\n  const { isOn, isOff, on, off, toggle } = useToggle();\n\n  return (\n    <button onClick={toggle}>\n      is {isOn ? 'on' : 'off'}\n    </button>\n  );\n}\n```\n","readmeFilename":"README.md"}