{"_id":"@caesium/hook-use-form","_rev":"8-bda7bf0f281fd8c18c4da5c45c342e4a","name":"@caesium/hook-use-form","dist-tags":{"latest":"1.5.0"},"versions":{"1.2.1":{"name":"@caesium/hook-use-form","version":"1.2.1","description":"`useForm` provides an interface around an object for use in forms.","repository":{"url":"git+https://github.com/CaesiumJS/hook-use-form.git","type":"git"},"main":"lib/react-hook-use-form.js","scripts":{"test":"jest","prepublishOnly":"tsc"},"author":{"name":"Adam Laycock","email":"adam@arcath.net"},"license":"MIT","devDependencies":{"@testing-library/react":"^11.2.5","@types/jest":"^26.0.21","@types/react":"^17.0.3","jest":"^26.6.3","prettier":"^2.2.1","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^26.5.4","typescript":"^4.2.3"},"gitHead":"6b7863ed634d065e4a9a8df2a449e0abe47d5ef8","bugs":{"url":"https://github.com/CaesiumJS/hook-use-form/issues"},"homepage":"https://github.com/CaesiumJS/hook-use-form#readme","_id":"@caesium/hook-use-form@1.2.1","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-W3u7tmQoD/WZKRtHtlTKqMfn2YNVNgIa3qQMDwnXJYbI/MVfXQUGXnqyZqJlW4SHYsj/ZAf6JdK5oTKfz4u/tw==","shasum":"64b281732036f4704d77b4ba4f31c2b0ab4bbec7","tarball":"https://registry.npmjs.org/@caesium/hook-use-form/-/hook-use-form-1.2.1.tgz","fileCount":7,"unpackedSize":15963,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkQk7CRA9TVsSAnZWagAANkQQAJHjVjJrGetINa8Z8PGo\nHOXSvM3Kg/sGoUL50k2dSjjaVd5WtPh3wLwP5o+dEineyf0cf86csZLupvEF\neCO4NeNcDLGdn3KQTbMqo3KvbFwyazsSbCQVBoMuQUA0PtV7p5vcsR9HAAkj\nObKbCGjAKY7cFRXc+LJPltYG2/P2Ohdi/X609w5H6/7kUAxZVDbDlPJKOXHg\nq5hmH/HiJsQfHrPlK17ZOgMWBUcot9Re1unGkJrR+X6bDRfhtjaAZZUrDjol\nbEeSG3WFanwMP+DckqmhzQr9h9HvOR9WVvCWZ4sKz5/Lncn2NDT0LWCModsm\n2IKlWY30Kq4RZ3TOoqutmSKG62Caq+ikQ0PHSSdwb0cSfK4EMepf/YSHkv8N\nCXTuOKCfbP08xGzDCWjNMO1PfXIy5oYoJrilv7n2pduyxvw6Mf3dZIIdFMmF\nLuj7Whu+xLtOc/i4BO+lfNHgr/v1swTtxRU7tOuBtFVBxJVGnXPwuopYqG9I\nLfoz9lYLSaq5xNsc5XFHXlm4awBHbPDjJkR3o4E7tmSIUU7u65uzEhpqpgXc\nMww+no8CQ7/AVQnzT+OVj8/vC3UwrLl9sPrqKGh5jQ7rqXwlkdox+dW7uMRh\nXerE2vXsyR3DCdFa5BzSXJ6/GBpLIupchgYXbhiAsNe5E4ynlobKoIDO8hsA\nJjrP\r\n=TMOl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEWVayg8arZHfLL60cmGWUsQ/QiwrAlnJ3jmLM0lViI2AiEA2CdIrogohDJEti4f5h+XklVgBSpHLBFq7mrvpQh+Y+w="}]},"_npmUser":{"name":"arcath","email":"adam@arcath.net"},"directories":{},"maintainers":[{"name":"arcath","email":"adam@arcath.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hook-use-form_1.2.1_1620117819126_0.7048074793349519"},"_hasShrinkwrap":false},"1.2.2":{"name":"@caesium/hook-use-form","version":"1.2.2","description":"`useForm` provides an interface around an object for use in forms.","repository":{"url":"git+https://github.com/CaesiumJS/hook-use-form.git","type":"git"},"main":"lib/react-hook-use-form.js","scripts":{"test":"jest","prepublishOnly":"tsc"},"author":{"name":"Adam Laycock","email":"adam@arcath.net"},"license":"MIT","devDependencies":{"@testing-library/react":"^11.2.5","@types/jest":"^26.0.21","@types/react":"^17.0.3","jest":"^26.6.3","prettier":"^2.2.1","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^26.5.4","typescript":"^4.2.3"},"gitHead":"97ed7c0ff173ae4dbb972d37e5bba102ef79e4a8","bugs":{"url":"https://github.com/CaesiumJS/hook-use-form/issues"},"homepage":"https://github.com/CaesiumJS/hook-use-form#readme","_id":"@caesium/hook-use-form@1.2.2","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-FWYBNCqtoqDsGvjkE6oHZtT4Q6jS3ls8LWaMadbiMQ8k1qpvz2+WVgUQBHrzisZGElU0mx5UTI7u4zL7pY5TNA==","shasum":"d8a9fe9b5cc587dec3fbeff37ae7e03b35213d7e","tarball":"https://registry.npmjs.org/@caesium/hook-use-form/-/hook-use-form-1.2.2.tgz","fileCount":7,"unpackedSize":16367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrj2eCRA9TVsSAnZWagAA0dMP+QFRHsmG13fdoTirWnZY\noWnDpvb/qjO1tD4yfLOh/LkrN1CuctFfXkHMCQlrJZC8BQGY5NVXbn9cRimJ\nwFqQU9+eDBo7KPPbyWwOVaEqfDeMzrtxdR37o4oD0zebDS7ytqlycXCulSnW\nR27XII/Pxbc2T3rr195q87RUBamlcfK5qGRDKSzyU64kc/u1MsgZa+35MNQq\nKkargVGlF6ROnHMk87wQcw3W3ALfAV/8dbVCA0K7NX0BW8SHXbh00jT0qVvK\nolNww403Hc91wDJ7WuT60S1ud8nKwA0Is7zSonJu3IkG3OHNkfB6p4hbeAii\nwUxJckYFeGVRYl03WRHrw0Kacj2B6Q7KqYNAeoEJ5NpcW4pPCHCNBun+UR/T\nOhqxzCQMdEFUBkHoLxaNJrR9+PKmzB5qn6AQuOK1//z4HVB9uW6krJJ1r9Dg\nkcbPTgBaoAo4W38RrloEcpHI7qNbk6SYMTHegqioIcEn/feWubDIZfqwIV7S\nXxSNntR3vyN6QRdjPbUBJJmRxK1F/FqhVSF80DV8YBqefy20+IIGR/tFfTMX\nhnNoQUXL48dH9Xw5LEX755HJvs7bSVF1T1GuaT/porBwGjc5FkoHAON6cdih\nLoA12sqzcET4Cvw/+E94akv7FqEIV/OuSYG7dZJ44/tPzhbtRJjIFkB7ZxTi\noPze\r\n=Hss7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH+Oj2S3jgCCPV/MscXaZusHm1Hcb3phgfp5IdhCSgdUAiBgcftf7W6Ac6AuszRC7YHd3IzrR8Q7WBdaPUtbbAHHdQ=="}]},"_npmUser":{"name":"arcath","email":"adam@arcath.net"},"directories":{},"maintainers":[{"name":"arcath","email":"adam@arcath.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hook-use-form_1.2.2_1622031774123_0.08233337589538547"},"_hasShrinkwrap":false},"1.2.3":{"name":"@caesium/hook-use-form","version":"1.2.3","description":"`useForm` provides an interface around an object for use in forms.","repository":{"url":"git+https://github.com/CaesiumJS/hook-use-form.git","type":"git"},"homepage":"https://caesiumjs.github.io/hook-use-form/","main":"lib/react-hook-use-form.js","scripts":{"test":"jest","build":"tsc","document":"typedoc --out ./docs --entryPoints src/react-hook-use-form.tsx"},"author":{"name":"Adam Laycock","email":"adam@arcath.net"},"license":"MIT","devDependencies":{"@arcath/utils":"^1.3.0","@testing-library/react":"^11.2.7","@types/jest":"^26.0.23","@types/react":"^17.0.8","jest":"^27.0.1","prettier":"^2.3.0","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.1","typedoc":"^0.20.36","typescript":"^4.2.4"},"gitHead":"12b31984195b3c37cddaa316aad088819c774d9c","bugs":{"url":"https://github.com/CaesiumJS/hook-use-form/issues"},"_id":"@caesium/hook-use-form@1.2.3","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-Aag7Y9Dg3WtYYlKG6yHwUy+Mg67Bjmlxn5zM50xyj2rNu/n8pGC/1pogmRuOhx0yaYSHffOn6/zC4M2UIv7G2Q==","shasum":"eaa18cca896aa2983aefde64f9b706b94549f253","tarball":"https://registry.npmjs.org/@caesium/hook-use-form/-/hook-use-form-1.2.3.tgz","fileCount":7,"unpackedSize":16411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr1y8CRA9TVsSAnZWagAAahEP/0Povif+URLtTP6zXjj3\nAQxVYRJzjRQDj80wuy772Ou4SIF8T6yQhLFTlo7dnOGq+TMC64R6857bA3dV\n3l5+z8SSizbNpzYNiOYSqj7OXbl8v7VBhTRQiSHOA/c4aYIQr1dk+TRhCkD4\np0prfPDkPzXkhuuvDWt1a/VQ4SRW2g3ZRw1GBscnoMp0aa6xNULu394Ms9cw\nqhl7hNo8/9/r9hGshYxTIdNk4NA/xS9c92SzFdMkhnqpcxFAhmP5VAyagFUL\nbOm97ddu2UII5JgZZBEfLYC4qdkY4hF0dI43HJGJk6JFW/b8JOC5AmCrpLFE\nc6AkExI3XHdRos79+x5qTLqNQwcDLPS2e/qAXhrz1Gy5K7rbdaRmj6p3uIqe\nnLCaPkLVAR9ET7yRZAU5LkK2d5HwmsgtC5L4th3jZoUJjXbxO+veLx3Of0mO\nwPqvMUqJedD64Is37JwPqBz7Nqd0LlyaQZklfGuAYgCBfkJQ0p1Kg6t4qBpl\n2d1Lv3xnFC33vPeZdK42GWYb8H7OyMUUYwPBi2ijd5K5goXXsPctEcFA1xDU\nHPLowrXGbDOsyMcaCieed2DNlg0wE5hLzoIhKbUW00XlOuuO08+gv3oUALhf\n+SHU457S9t+th9yaOCTSJs08zomSDcVG1L0vDEJev3z+fh71VI+l3u4tRVSu\nWhIF\r\n=kvkd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD635eUotRxI/m1NvJjxFbZ4/VyztyvFyqtNv+M5l/xWAIgMOh/X9cElnReDtN/jEhqAbBSvwI1VsgR/15X3azv4dk="}]},"_npmUser":{"name":"arcath","email":"adam@arcath.net"},"directories":{},"maintainers":[{"name":"arcath","email":"adam@arcath.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hook-use-form_1.2.3_1622105276143_0.9378025181829732"},"_hasShrinkwrap":false},"1.3.0":{"name":"@caesium/hook-use-form","version":"1.3.0","description":"`useForm` provides an interface around an object for use in forms.","repository":{"url":"git+https://github.com/CaesiumJS/hook-use-form.git","type":"git"},"homepage":"https://caesiumjs.github.io/hook-use-form/","main":"lib/react-hook-use-form.js","scripts":{"test":"jest","build":"tsc","document":"typedoc --out ./docs --entryPoints src/react-hook-use-form.tsx"},"author":{"name":"Adam Laycock","email":"adam@arcath.net"},"license":"MIT","devDependencies":{"@arcath/utils":"^1.3.0","@testing-library/react":"^11.2.7","@types/jest":"^26.0.23","@types/react":"^17.0.9","jest":"^27.0.4","prettier":"^2.3.1","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.3","typedoc":"^0.20.36","typescript":"^4.2.4"},"gitHead":"63a4e9de7e3175c36160cac5fa62c173b392a072","bugs":{"url":"https://github.com/CaesiumJS/hook-use-form/issues"},"_id":"@caesium/hook-use-form@1.3.0","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-1FpuN+C6FRu2T8TNhkC74aKICn3WwGEt13CFcCu3t7LcIQpX2s98r4SJMZrCGu4ZJ9T+z/co15QjHZx1F8nWKQ==","shasum":"347d0ac8cccb14f13d699631cb0ca732a73b1822","tarball":"https://registry.npmjs.org/@caesium/hook-use-form/-/hook-use-form-1.3.0.tgz","fileCount":7,"unpackedSize":16772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvzIoCRA9TVsSAnZWagAAmgYQAILGXYe0WLbWp8Gxc9pH\n+XfoX78ex8y3PWp0Y4NPthWlNnY5KfUOzKSKMdfKsjydshwWBHp0bNJUI3T+\nG51csFlJX4uQRwCG1Z1CenvGjWSMkUFDH3Bc/tNv6IzxwYyqhAebIwXBraRU\n5D9a3g+SxAmR8JE95yItdWDa4MV6lOJLacVXMP/luQtTXS6uEtT55PTJyb2u\nfz3KjALypqpizazhXBJGQCw+3rRfKWJRfXUqqMrkajgUCI/xn4RNWQb/oJuG\neY6hPWiYLjwBmX/6RnD8YtHbsQhniessir0njWag/7f/Pb6gWefsx/7+r9f0\nnqVf24g+JvO9k1xl6D1BtPFOZacmDVYw75BDyVkfn/mkPWB2enlTMUyUxnHX\n3ToSS1WlIbzt5KJRz+VYNrWP4QBi0TF9Wlt667l/X4r3zg+wod3LVLdZHcoW\npMTJBVF6QPT+EYK+ogzSDFgUkfVxEnWE2/bC+uQgUyPRzpzx28SAdHyOV8NP\nSZdkQNmCdxq3xXuLjKEib7r1GOMk99SWSCAseB+vn92FakMr3nuxxFV9xgZU\nkH7gHAmdAi0zc4WH9ZJfAxm8GesaH7PlL9UCiHJKdAFwipgDskKyhgvw58iC\nt1QdfH5RF2DfaMKXl54DWkkfkjmPNy85ztAT0Ex+c8mRoesMxt/W6K0Z0bgs\njhMZ\r\n=RNDK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTwjIDi1j05UTiK5M6qHgFia/IyO3xT0A0LY10OcO1+QIgI6kR5OnDD3uPVxJi+CmaKrKDs5NZ3zuHGkiH+GAvu5k="}]},"_npmUser":{"name":"arcath","email":"adam@arcath.net"},"directories":{},"maintainers":[{"name":"arcath","email":"adam@arcath.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hook-use-form_1.3.0_1623142951959_0.44830929321200497"},"_hasShrinkwrap":false},"1.3.1":{"name":"@caesium/hook-use-form","version":"1.3.1","description":"`useForm` provides an interface around an object for use in forms.","repository":{"url":"git+https://github.com/CaesiumJS/hook-use-form.git","type":"git"},"homepage":"https://caesiumjs.github.io/hook-use-form/","main":"lib/react-hook-use-form.js","scripts":{"test":"jest","build":"tsc","document":"typedoc --out ./docs --entryPoints src/react-hook-use-form.tsx"},"author":{"name":"Adam Laycock","email":"adam@arcath.net"},"license":"MIT","devDependencies":{"@arcath/utils":"^1.3.0","@testing-library/react":"^11.2.7","@types/jest":"^26.0.23","@types/react":"^17.0.9","jest":"^27.0.4","prettier":"^2.3.1","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.3","typedoc":"^0.20.36","typescript":"^4.2.4"},"gitHead":"38e3530acb8530db52c8e46efcbf90f711ee6141","bugs":{"url":"https://github.com/CaesiumJS/hook-use-form/issues"},"_id":"@caesium/hook-use-form@1.3.1","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-iSCDpB9+dLQW3A3FuHaKl03Nv7gcdFdJ27U55WcjB8gW7QwRhny4IRf/qH8TDRmBUvUovEDJksur6HihRuRv1w==","shasum":"547cc69d9de212976541193891a2f50a3071d028","tarball":"https://registry.npmjs.org/@caesium/hook-use-form/-/hook-use-form-1.3.1.tgz","fileCount":7,"unpackedSize":17327,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv0AQCRA9TVsSAnZWagAApsUP/1NIjeKgC1n9Rh9wpKHf\nvdq5CCdtRTCU+/ncSbWlJWLgZUB+Gojwfpw0OjcZC6RDv0zxmkpWBz1UJS2l\no3mlccK4RlYXucgKPlFGIxDPmA8ehC1xLEvw//KV/cy6YkijhPMeFHWs8QKH\nIUA2CPpf4nkR7vzYLYGzq4mP46QIEMoCWwln0SpsV3wK+aEjjH0TG8bkJah+\nIY+XbRzeXN3txRqZQuw/MgKkRBzyb1g4cu9wjg1vlmAdow4tZnaJFyVs3Ehn\nbqQczdQJ4poIdDhS5c3xkfT/9E/JEZEzT0GA2/DKfemtedECpqMIIb/WeMtS\ne45oV/ZPzc4EqILg9S7EOV8sI2Kv8BXcN35bvBCxozuNUigJxOG9hIZ+Q5BM\nMX+ymnE/mwRG0R/cteNFIqB01VctcpGSuycYoWd/TZH7y6cTJvdpgBqMAzgj\nj3uYdngs/0Qzf34Y0pKeCfzzEf77Y8fIyVw7GzbZBktA6nY+JhWrJHf+AunI\n8vjPNOJE+XzJDFQnR4ppYYGGPphEi74SjomKF0tUddZxQDAUlDnHenFFnBO6\nK0By2MxdHdDUlHon8FsfTYu3vz6HoMUmRKtoEeO6sbDwHUHqdHR7hJD5Jw3S\nkxSkgAj87qJF45HcDrFWEVyHn4JP0qJrDF83WYBdxNazyRWmZ5WfPKsuVJ1D\n3r5q\r\n=9uBC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwbXuWKDm0oMceRQT63DgiAtu2qlSWR4X94yPgSY6aIQIhAIlgx1OyMuBtPin4kE7hcDcfe7q6wgz6Vu9MJy4VcEhX"}]},"_npmUser":{"name":"arcath","email":"adam@arcath.net"},"directories":{},"maintainers":[{"name":"arcath","email":"adam@arcath.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hook-use-form_1.3.1_1623146512492_0.3544140664664217"},"_hasShrinkwrap":false},"1.4.0":{"name":"@caesium/hook-use-form","version":"1.4.0","description":"`useForm` provides an interface around an object for use in forms.","repository":{"url":"git+https://github.com/CaesiumJS/hook-use-form.git","type":"git"},"homepage":"https://caesiumjs.github.io/hook-use-form/","main":"lib/react-hook-use-form.js","scripts":{"test":"jest","build":"tsc","document":"typedoc --out ./docs --entryPoints src/react-hook-use-form.tsx"},"author":{"name":"Adam Laycock","email":"adam@arcath.net"},"license":"MIT","devDependencies":{"@arcath/utils":"^1.6.0","@testing-library/react":"^12.1.1","@types/jest":"^27.0.2","@types/react":"^17.0.24","jest":"^27.2.2","prettier":"^2.4.1","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.5","typedoc":"^0.22.4","typescript":"^4.4.3"},"gitHead":"6f7b115fff61730edd51a0dc2794ed0a24975ed7","bugs":{"url":"https://github.com/CaesiumJS/hook-use-form/issues"},"_id":"@caesium/hook-use-form@1.4.0","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-YUB5nwXt2tZUW/NJHUb9FHD0Sb+/Hm84O+hI1ysD5Ape7zNGcfrMTdKcVthh6q8FjIkOqg4SJoK69tjRfHvpWw==","shasum":"1c7bbb9de794176eeb824a0d47284524b8197ecf","tarball":"https://registry.npmjs.org/@caesium/hook-use-form/-/hook-use-form-1.4.0.tgz","fileCount":8,"unpackedSize":19162,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCZDSFxgCwPypZYxIiuvRtfCAhf1KKh/QoriUG2bk9GgIgcnS9dxqtspaG/iBNo0OFX7wR91oalVfByg02m0IKloY="}]},"_npmUser":{"name":"arcath","email":"adam@arcath.net"},"directories":{},"maintainers":[{"name":"arcath","email":"adam@arcath.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hook-use-form_1.4.0_1632771095689_0.23185101410104547"},"_hasShrinkwrap":false},"1.5.0":{"name":"@caesium/hook-use-form","version":"1.5.0","description":"Easy to use form state management for React.","repository":{"url":"git+https://github.com/CaesiumJS/hook-use-form.git","type":"git"},"homepage":"https://caesiumjs.github.io/hook-use-form/","main":"lib/react-hook-use-form.js","scripts":{"test":"jest","build":"tsc","document":"typedoc --out ./docs --entryPoints src/react-hook-use-form.tsx"},"author":{"name":"Adam Laycock","email":"adam@arcath.net"},"license":"MIT","devDependencies":{"@arcath/utils":"^1.7.0","@testing-library/react":"^12.1.2","@types/jest":"^27.0.2","@types/react":"^17.0.30","jest":"^27.3.1","prettier":"^2.4.1","react":"^17.0.2","react-dom":"^17.0.2","ts-jest":"^27.0.7","typedoc":"^0.22.6","typescript":"^4.4.4"},"gitHead":"400b937c04c80ab002ecc2286854cda8b53bf9d7","bugs":{"url":"https://github.com/CaesiumJS/hook-use-form/issues"},"_id":"@caesium/hook-use-form@1.5.0","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-dkd0h/FVQMf8qqZMJ6JbMEBo4D7BzhtRM8SiF5BVhHLeg321MA9zaaHpIM0ZmZ2bMMkGz1UXqWfT/sP3ayDiqw==","shasum":"84f07282ba0a2a623c56d74112a6e7becb28057e","tarball":"https://registry.npmjs.org/@caesium/hook-use-form/-/hook-use-form-1.5.0.tgz","fileCount":8,"unpackedSize":20089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzauvCRA9TVsSAnZWagAALcwP/j17LJNYjtT3PURvIxu6\ngzjEKnUflUQaZBYgeslDLFLVQNamEf8tArjEewOpd5NUePr28h75OPMX93/c\nnSiru1h/LcIA5WI4oP0gvUcbmWLinywOrFA8p3HdtsMOiO3viGZDUlr7/9Je\nl2LrFlllL/Cpo/wy224zmx18VpqoNQFBvUo03Nhqaa7eEQ314QbERJbsc/jY\n2fhJhbGva7P2SEXdc0nuRbbOHieKwc4O2v63djlYVQtUl6HtwRkfwkMW8U2A\nHueR3tIKaMRzx63dUMcpWvC6kBBgco9K66ULz0p093iq4udmeTOlvJn7wXiW\nJU9NQk8loFAIMGyfvRdrbKuLqsvHM4KOMFkygr0AvH2jsCyBFAJW4MlEu7cg\nNcPF4HilFEnH8+3y0ncR2JOQEcALqfgsSWQ50QlPcrSp1mVq78wcEinyGmRm\nG5xcvJaD29oONnkb4cNangJbTaHidEqcuAhkvLWcupW+VcpGxJNMcvV6Zfv7\njdkI7TO+E+EzEkT178qJn7YUKSiI5gM2X8NupBXJ6FNdehdkhxmfDnqcfCFs\noANLKuUzrT5yZQc2TDEbmCXzHjUC7WFsmFczmKooHnw2qf3FhGED9QqkrTZk\nFrvjSwt0TbGcRFdMsMq16rwkZYehmVjo2FhH0kqhYIIaDoQ/IDAms68UctIQ\nlNcW\r\n=0AG0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzruXXDxgRsQusI6T0HaOCDIb9pHT/uqEuqWUI9MQgCQIgcypnJhKJpAzSrjimGYwjo1qsrlL2uPtnG/I9nvt+KF8="}]},"_npmUser":{"name":"arcath","email":"adam@arcath.net"},"directories":{},"maintainers":[{"name":"arcath","email":"adam@arcath.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hook-use-form_1.5.0_1634638554689_0.20103020759004342"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-04T08:43:38.877Z","1.2.1":"2021-05-04T08:43:39.240Z","modified":"2022-04-04T21:30:11.275Z","1.2.2":"2021-05-26T12:22:54.259Z","1.2.3":"2021-05-27T08:47:56.287Z","1.3.0":"2021-06-08T09:02:32.139Z","1.3.1":"2021-06-08T10:01:52.629Z","1.4.0":"2021-09-27T19:31:35.864Z","1.5.0":"2021-10-19T10:15:54.836Z"},"maintainers":[{"name":"arcath","email":"adam@arcath.net"}],"description":"Easy to use form state management for React.","homepage":"https://caesiumjs.github.io/hook-use-form/","repository":{"url":"git+https://github.com/CaesiumJS/hook-use-form.git","type":"git"},"author":{"name":"Adam Laycock","email":"adam@arcath.net"},"bugs":{"url":"https://github.com/CaesiumJS/hook-use-form/issues"},"license":"MIT","readme":"# React Hook useForm\n\n`useForm` provides an interface around an object for use in forms.\n\n## Install\n\n```bash\nnpm install --save @caesium/hook-use-form\n```\n\n## Usage\n\n> The best `useForm` experiance comes when using Typescript.\n\nLets say you want to collect a users name and email for a newsletter form.\n\n```tsx\nconst NewsletterSignUp: React.FunctionComponent = () => {\n  const {formBind, bind, onSubmit} = useForm({\n    name: '',\n    email: ''\n  })\n\n  onSubmit((data) => {\n    // `data` is the forms state when it was submitted\n    doSignup(data.name, data.email)\n  })\n\n  return <form {...formBind()}>\n    <input {...bind('name')} />\n    <input {...bind('email')} />\n    <input type=\"submit\" value=\"Sign Up!\" />\n  </Form>\n}\n```\n\n`useForm`s output is an object with this structure:\n\n|property|type|value|\n|:-------|:----|:----|\n|bind|`(field: keyof T) => {value, onChange, name}`|Used to bind to a single field.|\n|clear|`() => void`|Function that sets the form back to its initial value.|\n|controlledInput|`(fieldName: keyof T) => ControlledInput`|Function that is used to create input fields (See Creating your own input).|\n|data|`T`|The current state of the form.|\n|formBind|`() => {onSumbit}`|Used to bind a forms submit action to `useForm`|\n|onSubmit|`(handler: (data: T) => void) => void`|A function which takes a callback to be used when the form is submitted.|\n|validate|`(field: keyof T, validator: (value: any) => boolean) => void`|A function that takes the field name and validation function as arguments.|\n|valid|`(field?: keyof T) => boolean`|A function that checks the validity of one field or the whole form and returns a boolean value.|\n|set|`(data: T) => void`|Function to set the `data` to a given value. Useful if you want to use one form to edit multiple entries.|\n|label|`(field: keyof T) => {for}|Returns the fields label `for`.|\n|changed|`(field?: keyof T) => boolean`|Has the given field, or any field changed from the intial data.|\n|submit|`() => void`|Submit the form.|\n|meta|`Meta`|The meta data set in options.|\n\n### Meta Data\n\nYou can optionally store meta data in the form state by passing a meta object in options.\n\n```tsx\nconst MyForm = () => {\n  const {formBind, meta, bind, onSubmit, set} = useForm({\n    name: ''\n  }, {meta: {userId: 0}})\n\n  onSubmit(({name}, {userId}) => {\n    if(userId === 0){\n      newUser(name)\n    }else{\n      updateUser(userId, name)\n    }\n  })\n\n  return <div>\n    <form {...formBind()}>\n      <b>{meta.userId === 0 ? 'Creating user' : 'Editing user'}</b>\n      <input {...bind('name')}>\n    </form>\n    <button onClick={() => {\n      set({name: 'First User'}, {userId: 1})\n    }}>Edit User 1</button>\n    <button onClick={() => {\n      set({name: 'Second User'}, {userId: 2})\n    }}>Edit User 2</button>\n  </div>\n}\n```\n\n`meta` can then be updated through the second parameter of `set`. This allows you to store additional state with your form instead of using `useState` in your own components.\n\n`meta` is passed to your submit handler as the second argument.\n\n### Validation\n\nValidating fields with `useForm` is easy. Going back to the earlier example, lets ensure that the email contains an `@`\n\n```tsx\nconst NewsletterSignUp: React.FunctionComponent = () => {\n  const {valid, bind, formBind, validate} = useForm({\n    name: '',\n    email: ''\n  })\n\n  validate('email', (value) => {\n    return value.indexOf('@') > -1\n  })\n\n  return <form {...formBind()}>\n    <input {...bind('name')} style={{color: valid('name') ? '#000' : '#f00'}} />\n    <input {...bind('email')} style={{color: valid('email') ? '#000' : '#f00'}} />\n    <input type=\"submit\" value=\"Subscribe\" disabled={!valid()} />\n  </form>\n}\n```\n\n## Creating your own input\n\nSometimes simply using `bind` wont work as your not using and `input` and you want to have a custom input.\n\n`useForm` returns a function of `controlledInput` which gives more control over a single field.\n\n`controlledInput` returns the following:\n\n|property|type|value|\n|:-------|:----|:----|\n|field|`keyof T`|The current field|\n|value|`T[field]`|The current value (connected to state)|\n|update|`(newValue: T[field]) => void`|Change the value to the supplied value|\n|valid|`() => boolean`|Returns a boolean value for the fields current validity|\n|bind|`{value, onChange, name}`|The same as if you had called `bind(field)` directly from `useForm`|\n|id|`string`|The id of the input.|","readmeFilename":"Readme.md"}