{"_id":"@bscop/use-form","_rev":"7-4cc0ff3595e43640f39a57dff57cf7d1","name":"@bscop/use-form","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"@bscop/use-form","version":"1.0.0","description":"A custom React hook handle form.","main":"package/dist/index.js","module":"package/dist/index.es.js","types":"package/src/index.d.ts","scripts":{"badge:coverage":"npm run test:coverage && codecov","prebuild":"rm -rf ./package/dist","build":"npm run build:js","build:js":"rollup -c rollup.config.js","build:storybook-style":"node-sass package/stories/storybook.scss package/stories/storybook.css","build:storybook":"npm run build:storybook-style && build-storybook -o docs","dev":"npm run build:js -- --watch | npm run test:unit -- --watch","lint":"eslint 'package/**'","prepare":"husky install","prepublishOnly":"npm run build","release":"standard-version","storybook":"start-storybook -p 6006","test":"npm run lint && npm run test:types && npm run test:unit","test:debug":"node --inspect $(npm bin)/jest --watch --no-cache --runInBand","test:types":"tsc --noEmit -p package/src","test:unit":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/@bscop/use-form.git"},"directories":{"src":"package/src"},"keywords":[],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/@bscop/use-form/issues"},"homepage":"https://github.com/brunoscopelliti/@bscop/use-form#readme","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.4","@babel/preset-react":"^7.14.5","@commitlint/cli":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^20.0.0","@storybook/addon-a11y":"^6.2.9","@storybook/addon-actions":"^6.2.9","@storybook/addon-essentials":"^6.2.9","@storybook/addon-links":"^6.2.9","@storybook/react":"^6.2.9","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^12.0.0","@testing-library/react-hooks":"^7.0.2","@testing-library/user-event":"^13.2.1","@types/jest":"^27.0.1","@types/prop-types":"^15.7.4","@types/react":"^17.0.20","@types/react-dom":"^17.0.9","babel-jest":"^27.1.0","babel-loader":"^8.2.2","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","codecov":"^3.8.3","eslint":"^7.32.0","eslint-config-bruno":"^3.0.0","eslint-config-standard":"^16.0.3","eslint-plugin-jest":"^24.4.0","eslint-plugin-react":"^7.25.1","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-testing-library":"^4.12.1","husky":"^7.0.2","jest":"^27.1.0","node-sass":"^6.0.1","normalize.css":"^8.0.1","regenerator-runtime":"^0.11.1","rollup":"^2.56.3","standard-version":"^9.3.1","typescript":"^4.4.2"},"peerDependencies":{"prop-types":"^15.7.2","react":">=17.0.0","react-dom":">=17.0.0"},"dependencies":{"@bscop/use-bool":"^1.0.1"},"gitHead":"e32ce73db45fd57e054ee568967b35d0451d56e3","_id":"@bscop/use-form@1.0.0","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-9jH9BNiW85mVR2d2MUY6rTcmzdkC5hJerZ1r6GWnlW6J3Sqa4aQeF9T8hztis2zggnXoi0TFJQdcuCqRmO6QHQ==","shasum":"1187d37ed8327f86e58c59df7adb39d4b97a7a13","tarball":"https://registry.npmjs.org/@bscop/use-form/-/use-form-1.0.0.tgz","fileCount":9,"unpackedSize":118751,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCihMV+I8gEKQiqHpD2rkwgQoxFNf3rYqpTVXge09gmbQIhAJZmPjtgmMJvAoi0Fvk05mYmOee2cNM75ZYteDQNu0cx"}]},"_npmUser":{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-form_1.0.0_1632256569800_0.29744256683411874"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bscop/use-form","version":"1.0.1","description":"A custom React hook handle form.","main":"package/dist/index.js","module":"package/dist/index.es.js","types":"package/src/index.d.ts","scripts":{"badge:coverage":"npm run test:coverage && codecov","prebuild":"rm -rf ./package/dist","build":"npm run build:js","build:js":"rollup -c rollup.config.js","build:storybook-style":"node-sass package/stories/storybook.scss package/stories/storybook.css","build:storybook":"npm run build:storybook-style && build-storybook -o docs","dev":"npm run build:js -- --watch | npm run test:unit -- --watch","lint":"eslint 'package/**'","prepare":"husky install","prepublishOnly":"npm run build","release":"standard-version","storybook":"start-storybook -p 6006","test":"npm run lint && npm run test:types && npm run test:unit","test:debug":"node --inspect $(npm bin)/jest --watch --no-cache --runInBand","test:types":"tsc --noEmit -p package/src","test:unit":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/@bscop/use-form.git"},"directories":{"src":"package/src"},"keywords":[],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/@bscop/use-form/issues"},"homepage":"https://github.com/brunoscopelliti/@bscop/use-form#readme","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.4","@babel/preset-react":"^7.14.5","@commitlint/cli":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^20.0.0","@storybook/addon-a11y":"^6.2.9","@storybook/addon-actions":"^6.2.9","@storybook/addon-essentials":"^6.2.9","@storybook/addon-links":"^6.2.9","@storybook/react":"^6.2.9","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^12.0.0","@testing-library/react-hooks":"^7.0.2","@testing-library/user-event":"^13.2.1","@types/jest":"^27.0.1","@types/prop-types":"^15.7.4","@types/react":"^17.0.20","@types/react-dom":"^17.0.9","babel-jest":"^27.1.0","babel-loader":"^8.2.2","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","codecov":"^3.8.3","eslint":"^7.32.0","eslint-config-bruno":"^3.0.0","eslint-config-standard":"^16.0.3","eslint-plugin-jest":"^24.4.0","eslint-plugin-react":"^7.25.1","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-testing-library":"^4.12.1","husky":"^7.0.2","jest":"^27.1.0","node-sass":"^6.0.1","normalize.css":"^8.0.1","regenerator-runtime":"^0.11.1","rollup":"^2.56.3","standard-version":"^9.3.1","typescript":"^4.4.2"},"peerDependencies":{"prop-types":"^15.7.2","react":">=17.0.0","react-dom":">=17.0.0"},"dependencies":{"@bscop/use-bool":"^1.0.1"},"gitHead":"336168f85a7e63f60c4e001ada56349d02af057d","_id":"@bscop/use-form@1.0.1","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-Y/6XSG4YqSq7DiUcibVhX4GcoPSvavwRbG1eEG05ZVT9vp988lsbQrsxhmH2tp6VR7X89i7aVQYwOCYpcF8veg==","shasum":"13d352a29d0b32d57757ee9e99de2069f5f69655","tarball":"https://registry.npmjs.org/@bscop/use-form/-/use-form-1.0.1.tgz","fileCount":9,"unpackedSize":119351,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOuvlTwZTa+voqGYHBlsk4lpFbZOqATK1j/gVJ+6XqngIgWoGT/ZpEq4ve7zFpbVYASp91icCQZ+MguUgOfdCT6LI="}]},"_npmUser":{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-form_1.0.1_1632686849939_0.7154832140428429"},"_hasShrinkwrap":false},"1.1.0":{"name":"@bscop/use-form","version":"1.1.0","description":"A custom React hook handle form.","main":"package/dist/index.js","module":"package/dist/index.es.js","types":"package/src/index.d.ts","scripts":{"badge:coverage":"npm run test:coverage && codecov","prebuild":"rm -rf ./package/dist","build":"npm run build:js","build:js":"rollup -c rollup.config.js","build:storybook-style":"node-sass package/stories/storybook.scss package/stories/storybook.css","build:storybook":"npm run build:storybook-style && build-storybook -o docs","dev":"npm run build:js -- --watch | npm run test:unit -- --watch","lint":"eslint 'package/**'","prepare":"husky install","prepublishOnly":"npm run build","release":"standard-version","storybook":"start-storybook -p 6006","test":"npm run lint && npm run test:types && npm run test:unit","test:debug":"node --inspect $(npm bin)/jest --watch --no-cache --runInBand","test:types":"tsc --noEmit -p package/src","test:unit":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/@bscop/use-form.git"},"directories":{"src":"package/src"},"keywords":[],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/@bscop/use-form/issues"},"homepage":"https://github.com/brunoscopelliti/@bscop/use-form#readme","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.4","@babel/preset-react":"^7.14.5","@commitlint/cli":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^20.0.0","@storybook/addon-a11y":"^6.2.9","@storybook/addon-actions":"^6.2.9","@storybook/addon-essentials":"^6.2.9","@storybook/addon-links":"^6.2.9","@storybook/react":"^6.2.9","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^12.0.0","@testing-library/react-hooks":"^7.0.2","@testing-library/user-event":"^13.2.1","@types/jest":"^27.0.1","@types/prop-types":"^15.7.4","@types/react":"^17.0.20","@types/react-dom":"^17.0.9","babel-jest":"^27.1.0","babel-loader":"^8.2.2","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","codecov":"^3.8.3","eslint":"^7.32.0","eslint-config-bruno":"^3.0.0","eslint-config-standard":"^16.0.3","eslint-plugin-jest":"^24.4.0","eslint-plugin-react":"^7.25.1","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-testing-library":"^4.12.1","husky":"^7.0.2","jest":"^27.1.0","node-sass":"^6.0.1","normalize.css":"^8.0.1","regenerator-runtime":"^0.11.1","rollup":"^2.56.3","standard-version":"^9.3.1","typescript":"^4.4.2"},"peerDependencies":{"prop-types":"^15.7.2","react":">=17.0.0","react-dom":">=17.0.0"},"dependencies":{"@bscop/use-bool":"^1.0.1"},"gitHead":"4b6558054847bbfe53309a676d70a99c0b5b197d","_id":"@bscop/use-form@1.1.0","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-xqWZVkdX7zEbLQ1ODNdz9Ju/x/ZCPtehlouUQ3Td8e8SM+rqmiMwtr5qGNuGXO4hb2IinQWkfMiHdr9hIJs7Tg==","shasum":"73d7fdb83dc069433250559810e7f1388c233fa1","tarball":"https://registry.npmjs.org/@bscop/use-form/-/use-form-1.1.0.tgz","fileCount":9,"unpackedSize":123762,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAtbM6XYGYEpjW0eYcuK+wkKIP7QZgZBIriGCyg+WWTKAiEA+nMUHNzwQaRoRQnqCTQ4IhQOWnV8VOpKqbsWQQMzGVc="}]},"_npmUser":{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-form_1.1.0_1632769476986_0.24734655201170397"},"_hasShrinkwrap":false},"1.1.1":{"name":"@bscop/use-form","version":"1.1.1","description":"A custom React hook handle form.","main":"package/dist/index.js","module":"package/dist/index.es.js","types":"package/src/index.d.ts","scripts":{"badge:coverage":"npm run test:coverage && codecov","prebuild":"rm -rf ./package/dist","build":"npm run build:js","build:js":"rollup -c rollup.config.js","build:storybook-style":"node-sass package/stories/storybook.scss package/stories/storybook.css","build:storybook":"npm run build:storybook-style && build-storybook -o docs","dev":"npm run build:js -- --watch | npm run test:unit -- --watch","lint":"eslint 'package/**'","prepare":"husky install","prepublishOnly":"npm run build","release":"standard-version","storybook":"start-storybook -p 6006","test":"npm run lint && npm run test:types && npm run test:unit","test:debug":"node --inspect $(npm bin)/jest --watch --no-cache --runInBand","test:types":"tsc --noEmit -p package/src","test:unit":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/@bscop/use-form.git"},"directories":{"src":"package/src"},"keywords":[],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/@bscop/use-form/issues"},"homepage":"https://github.com/brunoscopelliti/@bscop/use-form#readme","devDependencies":{"@babel/core":"^7.16.5","@babel/preset-env":"^7.16.5","@babel/preset-react":"^7.16.5","@commitlint/cli":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@storybook/addon-a11y":"^6.4.9","@storybook/addon-actions":"^6.4.9","@storybook/addon-essentials":"^6.4.9","@storybook/addon-links":"^6.4.9","@storybook/react":"^6.4.9","@testing-library/jest-dom":"^5.16.1","@testing-library/react":"^12.1.2","@testing-library/react-hooks":"^7.0.2","@testing-library/user-event":"^13.5.0","@types/jest":"^27.0.3","@types/prop-types":"^15.7.4","@types/react":"^17.0.38","@types/react-dom":"^17.0.11","babel-jest":"^27.4.5","babel-loader":"^8.2.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","codecov":"^3.8.3","eslint":"^7.32.0","eslint-config-bruno":"^3.0.0","eslint-config-standard":"^16.0.3","eslint-plugin-jest":"^24.4.0","eslint-plugin-react":"^7.25.1","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-testing-library":"^4.12.1","husky":"^7.0.4","jest":"^27.4.5","node-sass":"^6.0.1","normalize.css":"^8.0.1","regenerator-runtime":"^0.11.1","rollup":"^2.56.3","standard-version":"^9.3.2","typescript":"^4.5.4"},"peerDependencies":{"prop-types":"^15.7.2","react":">=17.0.0","react-dom":">=17.0.0"},"dependencies":{"@bscop/use-bool":"^1.0.1"},"gitHead":"af6d87e4bb02632c8957878fd69e8dfcc901b63a","_id":"@bscop/use-form@1.1.1","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-e4is/cDXci5t4JKpd/fEpSxny24g/9DNcjCPsmlsFx9xY/uQq346vggZ0GrGav7k/qpPK5BgaUIe4pEjxRVBzw==","shasum":"5e52377067b31d4b34623926ebfde944220e6401","tarball":"https://registry.npmjs.org/@bscop/use-form/-/use-form-1.1.1.tgz","fileCount":9,"unpackedSize":127439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzJ61CRA9TVsSAnZWagAA3CEQAJZsgAak6zB7MlkOL4gz\nmC8FFY+MEVD8Qn86nzo/b04prJg+sdSUaQMJkrMClvLvpHp6JQ53/LdF2lkC\n5oZZbaTksbilWtl/XaxDsSYJfnfInX5yiHUxgJHHYVIB8hKiMyf7BXJOKnrN\nPWfjHd1z3DDQLnT15+rZnjdbKjHB6bjeX/+PRC7mgz38TdZtW/BMq/Ws3dqX\nAUW9iCdZRxezno9c5clQGqTNv3gcAbRxnSVHgRMaDFWN2i8f/jTcX/GT3akw\nZ1rZFqaUoYaew2y+/T85TpeDhGFIQziKwqJs9U0/NchxMH5yu0N8EvE+kBGI\nd7KaevvmpCsr+CgSEv99IrcYlYPdUqRAB1vhIGGWtybXIsw7HDJvqptZPxZ3\nkJA8cn2ooGzrhFdBzrifcAdCgDRtP5bsoyt6WpgHtLvnoYymUA2T2zJC+ziZ\n4v3TXtvDvg5HjZsKRfFAHIr2II5N5hy3oKBsmk8qCTxrBX2Uzu4ZY4mw1Nop\nK46KZQEGPBO9+L0uXUlyYkE8oGcGO/yTsgaEJj5E8S0MNYA9gzti6AoUCA6L\nujyipZzaL7H6P/Azg2FMBKkS3absqa/97UfN7+5vaID7/tCX/1uiaXNHy1MG\nUS5y9WMrUbj0VS49L/2VWaBpVRjGSu54f+85INmHTjd6snuPbAJmb6Q7tWme\nuTeZ\r\n=5jWV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHlsf6zZjjrEkYRZ2lZuDLORqdzWDxDbS4/KRJHq6grIAiAeBCspzLl7P6h9JEAjVxCEVyUcrMxQ+9JFPjtXj2u/Qw=="}]},"_npmUser":{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-form_1.1.1_1640799925503_0.20832397752452136"},"_hasShrinkwrap":false},"2.0.0":{"name":"@bscop/use-form","version":"2.0.0","description":"A custom React hook handle form.","main":"package/dist/index.js","module":"package/dist/index.es.js","types":"package/src/index.d.ts","scripts":{"badge:coverage":"npm run test:coverage && codecov","prebuild":"rm -rf ./package/dist","build":"npm run build:js","build:js":"rollup -c rollup.config.js","build:storybook-style":"node-sass package/stories/storybook.scss package/stories/storybook.css","build:storybook":"npm run build:storybook-style && build-storybook -o docs","dev":"npm run build:js -- --watch | npm run test:unit -- --watch","lint":"eslint 'package/**'","prepare":"husky install","prepublishOnly":"npm run build","release":"standard-version","storybook":"start-storybook -p 6006","test":"npm run lint && npm run test:types && npm run test:unit","test:debug":"node --inspect $(npm bin)/jest --watch --no-cache --runInBand","test:types":"tsc --noEmit -p package/src","test:unit":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/@bscop/use-form.git"},"directories":{"src":"package/src"},"keywords":[],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/@bscop/use-form/issues"},"homepage":"https://github.com/brunoscopelliti/@bscop/use-form#readme","devDependencies":{"@babel/core":"^7.16.5","@babel/preset-env":"^7.16.5","@babel/preset-react":"^7.16.5","@commitlint/cli":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@storybook/addon-a11y":"^6.4.9","@storybook/addon-actions":"^6.4.9","@storybook/addon-essentials":"^6.4.9","@storybook/addon-links":"^6.4.9","@storybook/react":"^6.4.9","@testing-library/jest-dom":"^5.16.1","@testing-library/react":"^12.1.2","@testing-library/react-hooks":"^7.0.2","@testing-library/user-event":"^13.5.0","@types/jest":"^27.0.3","@types/prop-types":"^15.7.4","@types/react":"^17.0.38","@types/react-dom":"^17.0.11","babel-jest":"^27.4.5","babel-loader":"^8.2.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","codecov":"^3.8.3","eslint":"^7.32.0","eslint-config-bruno":"^3.0.0","eslint-config-standard":"^16.0.3","eslint-plugin-jest":"^24.4.0","eslint-plugin-react":"^7.25.1","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-testing-library":"^4.12.1","husky":"^7.0.4","jest":"^27.4.5","node-sass":"^6.0.1","normalize.css":"^8.0.1","regenerator-runtime":"^0.11.1","rollup":"^2.56.3","standard-version":"^9.3.2","typescript":"^4.5.4"},"peerDependencies":{"prop-types":"^15.7.2","react":">=17.0.0","react-dom":">=17.0.0"},"dependencies":{"@bscop/use-bool":"^1.0.1"},"gitHead":"c3d6a3d70db05bd55282fcf53726cf5f0c098f64","_id":"@bscop/use-form@2.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-9aAVVWHBjucOiS7HlyhbmwDSIg/+MVl1D5RIHj3MSh4+SEI4c8WeBgbsmT0HnQsMzR0La1SV+dF+E1hEptxg6A==","shasum":"05cc349bd18f5cde2bb671b178d8cfbbeb7fb35e","tarball":"https://registry.npmjs.org/@bscop/use-form/-/use-form-2.0.0.tgz","fileCount":9,"unpackedSize":126821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzeV/CRA9TVsSAnZWagAAqNwQAJqTurS+SSaBckP4IkUm\nrYzZOhJTKMTCSYZNijU4C7uTA1ZS3Fs1QC5OEJD3Q4vx32RYeaosnO6zuUje\nbQgC8fxM6urviSF+SnWfg8A/Dve3V+5Uxko6cyIHYJz4ZObtyB2OR5wdmRXs\nUtZ3KeUF9AvFNue3CPk8pM8ep7l5Yep1QxQdw2OMvWYK2lWhCP5RW16m8GM2\nngGY31she3x0WCiUS8oxXh7mLCGIhNCtJIrJiCn6qvqfR5N3DHZ3DwojCDbC\ncUij0/asUJh0++4p3t6c7WU9knmSHE8Fx5GmH0TOQ3eDEylphDjqMKFG2WNK\ncDZobCUsLO8wm2NSCb6+PGxKVnm8aDCxA9T+AD6aT2L4xf5ZoBXBux5KUnZS\nz/uRRz7RTsuinVtLzUjWqe0NDi/E08zHvM3uaoeQe2JB42bFXLAtfhc0eyWL\nAnoUBXKR+dlLyBIwDDxmTcGAY863ZfYhox3r8V8UC5AjGA7hjFxa0HgD7sVJ\n+NeUoJhfxnNkRKquPP7hGf31QbhF0VuRSueZt4hvlbbE+kkUScSVD+1k2FsV\narmBwlMGbaP7Ry91mjQ7PCm/IA9NE+iyaX+EaGs5IdPrQgf3NpWvrDb3Hu4d\nZhQQfcPcsfUjIsBkUZn5u0IiIjvniOWFgXid69MynB/Uau3g4z2ZPNKMAsgC\np/Dp\r\n=9LOf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE4bWSW1f4H+7wjDy6b09CxakYG4w5w+20Bc+KOZBScZAiEAosqeXEOcXUxlPcIY/UF1o17pcYNmknw0KuoYw4mcXtE="}]},"_npmUser":{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-form_2.0.0_1640883582921_0.7716188390267358"},"_hasShrinkwrap":false},"2.0.1":{"name":"@bscop/use-form","version":"2.0.1","description":"A custom React hook handle form.","main":"package/dist/index.js","module":"package/dist/index.es.js","types":"package/src/index.d.ts","scripts":{"badge:coverage":"npm run test:coverage && codecov","prebuild":"rm -rf ./package/dist","build":"npm run build:js","build:js":"rollup -c rollup.config.js","build:storybook-style":"node-sass package/stories/storybook.scss package/stories/storybook.css","build:storybook":"npm run build:storybook-style && build-storybook -o docs","dev":"npm run build:js -- --watch | npm run test:unit -- --watch","lint":"eslint 'package/**'","prepare":"husky install","prepublishOnly":"npm run build","release":"standard-version","storybook":"start-storybook -p 6006","test":"npm run lint && npm run test:types && npm run test:unit","test:debug":"node --inspect $(npm bin)/jest --watch --no-cache --runInBand","test:types":"tsc --noEmit -p package/src","test:unit":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/@bscop/use-form.git"},"directories":{"src":"package/src"},"keywords":[],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/@bscop/use-form/issues"},"homepage":"https://github.com/brunoscopelliti/@bscop/use-form#readme","devDependencies":{"@babel/core":"^7.16.5","@babel/preset-env":"^7.16.5","@babel/preset-react":"^7.16.5","@commitlint/cli":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@storybook/addon-a11y":"^6.4.9","@storybook/addon-actions":"^6.4.9","@storybook/addon-essentials":"^6.4.9","@storybook/addon-links":"^6.4.9","@storybook/react":"^6.4.9","@testing-library/jest-dom":"^5.16.1","@testing-library/react":"^12.1.2","@testing-library/react-hooks":"^7.0.2","@testing-library/user-event":"^13.5.0","@types/jest":"^27.0.3","@types/prop-types":"^15.7.4","@types/react":"^17.0.38","@types/react-dom":"^17.0.11","babel-jest":"^27.4.5","babel-loader":"^8.2.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","codecov":"^3.8.3","eslint":"^7.32.0","eslint-config-bruno":"^3.0.0","eslint-config-standard":"^16.0.3","eslint-plugin-jest":"^24.4.0","eslint-plugin-react":"^7.25.1","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-testing-library":"^4.12.1","husky":"^7.0.4","jest":"^27.4.5","node-sass":"^6.0.1","normalize.css":"^8.0.1","regenerator-runtime":"^0.11.1","rollup":"^2.56.3","standard-version":"^9.3.2","typescript":"^4.5.4"},"peerDependencies":{"prop-types":"^15.7.2","react":">=17.0.0","react-dom":">=17.0.0"},"dependencies":{"@bscop/use-bool":"^1.0.1"},"gitHead":"31e4ee9edd2a0c7e93795a87315a04d5c6750ddd","_id":"@bscop/use-form@2.0.1","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-iC5qPDUMTlBrSVqb7U22k3ZkRYxKHCbgFOxJWdk1DtPloc/CAXNEkf+hMVJl34SgeNdRswAKk9sffAXJOwrnnQ==","shasum":"7c576f627f163a6ce3da5e72b2d8c1ddc57eb5e5","tarball":"https://registry.npmjs.org/@bscop/use-form/-/use-form-2.0.1.tgz","fileCount":9,"unpackedSize":127172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1AGvCRA9TVsSAnZWagAAJ3IP+gJJNI9ZK6NGVwsqbYyO\ndOSZ5LLQPMS7hfOwcW5h3JjgNaXu8h2dVIxICCrWukfnD2k7oMsxIbEgSqrq\n9Cl9NByVF2Kv+UavJ1xm1NqQBrJmtK9y7bmd3Unqiqsm0lX5Cjz9cENKn6BP\n5zVkzGgJ6ysSh1dB7CZXkmafRD5SwZNSRUyQyS2r7jPHepsoqxSuTXgzN5R/\nyUMp7c2ehVO68otdG3AxktvUiU1LAv7BrogG5dep4zMRwuGrLki32W8IfTBS\nYssjZsRdVdiKMuZfMy/Zrb/itPmbeqpCw1ApKOod2ARlxnVsdhwJ4TfmWD7i\nsnAr8ovu2B7X+OvZRybf8GEGPdGHQXCytowCNkDsuXP3iYTYzuj205+OvOtr\nbZtBTDCCNHLTc5SXYi8oJhP3aujIDsV8cncsYynun+oA4xj2XvMnx6pNgmZ+\nVHzU2laWGNkjfgmIFCejHEO0tPKWiET0VQ4NqH9U6wmF5GUHN/svO+/uQnmJ\nR7W2cIsIFRsfbH0Xcq3noJfdAYYq4/2SGVpsUtaYYrjdLWCdmkAa7yWrQrZJ\ndPtJxfwH4S2hAMtbSWwevuYLKRvlDdZL9Q+lJtg+QgH3YP5ow15pmjLMKo9q\nOXHBOmlY2vAQ3HOuSPls51nAPgamUeIonkeiNccwE+ma0L1N95dlMUfXUSpY\n87lv\r\n=IOct\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCF2uYzf0kSlhnQGkqHqrlcQf5Dcb/btiJebgp7tVqEZQIhALKireZMBcTsxnbPFM5L51Yuhr4x1ORilYlygeobz6YQ"}]},"_npmUser":{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-form_2.0.1_1641284014873_0.6742142570453127"},"_hasShrinkwrap":false},"2.1.0":{"name":"@bscop/use-form","version":"2.1.0","description":"A custom React hook handle form.","main":"package/dist/index.js","module":"package/dist/index.es.js","types":"package/src/index.d.ts","scripts":{"badge:coverage":"npm run test:coverage && codecov","prebuild":"rm -rf ./package/dist","build":"npm run build:js","build:js":"rollup -c rollup.config.js","build:storybook-style":"node-sass package/stories/storybook.scss package/stories/storybook.css","build:storybook":"npm run build:storybook-style && build-storybook -o docs","dev":"npm run build:js -- --watch | npm run test:unit -- --watch","lint":"eslint 'package/**'","prepare":"husky install","prepublishOnly":"npm run build","release":"standard-version","storybook":"start-storybook -p 6006","test":"npm run lint && npm run test:types && npm run test:unit","test:debug":"node --inspect $(npm bin)/jest --watch --no-cache --runInBand","test:types":"tsc --noEmit -p package/src","test:unit":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/@bscop/use-form.git"},"directories":{"src":"package/src"},"keywords":[],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/@bscop/use-form/issues"},"homepage":"https://github.com/brunoscopelliti/@bscop/use-form#readme","devDependencies":{"@babel/core":"^7.16.5","@babel/preset-env":"^7.16.5","@babel/preset-react":"^7.16.5","@commitlint/cli":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@storybook/addon-a11y":"^6.4.9","@storybook/addon-actions":"^6.4.9","@storybook/addon-essentials":"^6.4.9","@storybook/addon-links":"^6.4.9","@storybook/react":"^6.4.9","@testing-library/jest-dom":"^5.16.1","@testing-library/react":"^12.1.2","@testing-library/react-hooks":"^7.0.2","@testing-library/user-event":"^13.5.0","@types/jest":"^27.0.3","@types/prop-types":"^15.7.4","@types/react":"^17.0.38","@types/react-dom":"^17.0.11","babel-jest":"^27.4.5","babel-loader":"^8.2.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","codecov":"^3.8.3","eslint":"^7.32.0","eslint-config-bruno":"^3.0.0","eslint-config-standard":"^16.0.3","eslint-plugin-jest":"^24.4.0","eslint-plugin-react":"^7.25.1","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-testing-library":"^4.12.1","husky":"^7.0.4","jest":"^27.4.5","node-sass":"^6.0.1","normalize.css":"^8.0.1","regenerator-runtime":"^0.11.1","rollup":"^2.56.3","standard-version":"^9.3.2","typescript":"^4.5.4"},"peerDependencies":{"prop-types":"^15.7.2","react":">=17.0.0","react-dom":">=17.0.0"},"dependencies":{"@bscop/use-bool":"^1.0.1"},"gitHead":"787b1871578216116246d361d7ff5a0eef07efe6","_id":"@bscop/use-form@2.1.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-+QJ+PyAYOgRAg9su8smy3XSV6C4iYARf2yQ+MVFoQqlqJFRh0/795gn4NFzBXXvPpT6BmUCCqT7QbWvltIHptQ==","shasum":"5e2eb11ac61f0cc8fd85918b34c9d7a12a117b3f","tarball":"https://registry.npmjs.org/@bscop/use-form/-/use-form-2.1.0.tgz","fileCount":9,"unpackedSize":128496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2FsRCRA9TVsSAnZWagAAkuAP/RvlkFpOXOZCwZmcIItt\nMzKYGKjw1GwDRAu+kk6LXjX00Fh42VVOxfoxar7+bl62E09pQf1otuJtWi4D\nWoHd2fUiHHRbRDK3CWTufH4/0jvX1/bMcBF6dBvjk1sLGWi/K5WZ6Ad0MAa0\ngoKH8CFvOC5el/J3h7GuwSqi/xYeE5ISlHfV5G5Ob+T95R24bPJysANzEGhp\n8E761p3NhKQMCe+xKJb6DcQ+kTnI75O0mKvPilCKQjOpAc72MPELDbFKL7cA\nNq7JN7Tn5N7xNwM8mIdS6Ni1ufuXq8OQWivLCS1hOj1sfqHhQee08tv7YEob\nWpJ5OXqSfrckmccNZYVoVfEi3jsw9pTktDMj+S9JfCLJUKK7LY7uGEMfXgCv\noVQr+YuofihL68Dm4XLrQqL4TjL2ZzTCX4LZFCFhkZZj5gqxVFtfXytmhlsQ\n1pqqTcLiVYocu3theM6MKtPRd1qysCzAEn7XOhRR8cpbLzsqlCeoG+yohYJD\niMfZyQdglKFqbedg6aFtzkHLcuzWNIfC3LaaKrIDrSD4Qb6g4h5gIVx+xJhW\nnlLp8r10ff7n3N+1MzE/edwfd+pXyfXvqbRQETSCzZm05AizWeRy6OlJRs0v\nB3vwsCgqY8gy/ciAlUnZUVmjvr6Fviy8mcqgrvcQ7P1G5NiWRZcZYEZK1b9L\nCIrR\r\n=ycnz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGIY2J7aQ23RGWzfOGCjJlrk4iVgfigVygVYNFvTxbcQAiEA/QiQjnlMmXmHEX4uJ/L5l7awc9MlNInuMNLEJ9wwzpE="}]},"_npmUser":{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-form_2.1.0_1641569041157_0.8878644178901525"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-21T20:36:09.733Z","1.0.0":"2021-09-21T20:36:09.939Z","modified":"2022-04-04T20:50:34.215Z","1.0.1":"2021-09-26T20:07:30.103Z","1.1.0":"2021-09-27T19:04:37.166Z","1.1.1":"2021-12-29T17:45:25.670Z","2.0.0":"2021-12-30T16:59:43.160Z","2.0.1":"2022-01-04T08:13:35.021Z","2.1.0":"2022-01-07T15:24:01.380Z"},"maintainers":[{"name":"brunoscopelliti","email":"bru.scopelliti@gmail.com"}],"description":"A custom React hook handle form.","homepage":"https://github.com/brunoscopelliti/@bscop/use-form#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/@bscop/use-form.git"},"author":{"name":"Bruno Scopelliti"},"bugs":{"url":"https://github.com/brunoscopelliti/@bscop/use-form/issues"},"license":"MIT","readme":"# @bscop/use-form\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/brunoscopelliti/@bscop/use-form/blob/main/LICENSE)\n[![npm version](https://img.shields.io/npm/v/@bscop/use-form.svg?style=flat)](https://www.npmjs.com/package/@bscop/use-form)\n[![CircleCI Status](https://circleci.com/gh/brunoscopelliti/use-form.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/brunoscopelliti/@bscop/use-form)\n[![Coverage](https://img.shields.io/codecov/c/github/brunoscopelliti/use-form)](https://app.codecov.io/gh/brunoscopelliti/@bscop/use-form/)\n\nA custom React hook handle form.\n\n[View in Storybook](https://brunoscopelliti.github.io/use-form).\n\n## Install\n\n```\nnpm i @bscop/use-form\n```\n\n## Usage\n\n```js\nimport useForm from \"@bscop/use-form\";\n\nfunction App () {\n  const { onSubmit, pending, register } = useForm(\n    {\n      email: {\n        label: \"Email\",\n        schema: [\n          {\n            id: \"required\",\n          },\n        ],\n      }\n    }\n  );\n\n  const send = \n    (payload) => {\n      fetch(\"/\", { method: \"POST\", body: JSON.stringify(payload) })\n        .then(\n          () => {\n            // ...\n          }\n        )\n    };\n\n  return (\n    <form onSubmit={onSubmit(send)}>\n      <div>\n        <label>\n          Email:\n          <input {...register(\"email\", { type: \"email\" })}/>\n        </label>\n      </div>\n      <button disabled={pending} type=\"submit\">Save</button>\n    </form>\n  );\n}\n```\n\n## API\n\n```ts\nconst {\n  debug,\n  errors,\n  forceValue,\n  pending,\n  onSubmit,\n  register,\n  resetForm,\n  unregister,\n  valueOf,\n} : HookResult = useForm(config: FormConfig);\n```\n\n### FormConfig\n\nWhen executing `useForm` we pass to an object to configure the form.\\\n`FormConfig` is an object whose keys correspond to name of inputs present in the form, and values contains the configuration for each field (`Field`).\n\n```ts\nconst fieldEmailConfig : Field = {\n  schema: [\n    {\n      id: \"required\",\n    },\n  ]\n};\n\nconst fieldPasswordConfig : Field = {\n};\n\nconst formConfig : FormConfig = {\n  email: fieldEmailConfig,\n  password: fieldPasswordConfig,\n}\n\nuseForm(formConfig);\n```\n\nEach field may have following configuration properties:\n\n* `defaultValue` (`[string]`) : it's used as initial value, and after the form is reset, or the field in unregistered.\n\n* `label` (`string`) : it's used to reference the field in validation error message.\n\n* `schema` (`[Rule[]]`) : it specifies the rules the field value must respect - more on this subject later.\n\n* `value` (`[string|string[]]`) : it specifies the initial value of the field - it can be a list of values to accomodate for the possibility of checkbox, and select to have multiple value selected at the same time.\n\n#### Validation schema\n\nIt's a list of validation the field value must pass in order to be considered valid. Each validation validation rule must have an `id` field that matches the name of a built-in rule.\n\nBuilt-in rules are:\n\n* required : `{ id: \"required\" }`.\n* max length : `{ id: \"maxlen\", attrs: { size: number } }`.\n* min length : `{ id: \"minlen\", attrs: { size: number } }`.\n* format : `{ id: \"format\", attrs: { regexp : string} }`.\n* range : `{ id: \"range\", attrs: { range : number[] } }`.\n* date : `{ id: \"date\" }`.\n* one of : `{ id: \"oneof\", attrs: { options : string[] } }`.\n\nEach rule can optionally also specify a message to override the default message; eg.\n\n```js\nuseForm(\n  {\n    name: {\n      schema: [\n        {\n          id: \"required\",\n          message: \"Did you forget something?\",\n        },\n      ]\n    }\n  }\n)\n```\n\nIt's also possible to specify a custom validation rule inline; eg.\n\n```ts\nuseForm(\n  {\n    name: {\n      schema: [\n        {\n          validate (\n            name : string,\n            label : string,\n            value : string|string[],\n            rule : Rule,\n            formState : unknown\n          ) : undefined|string {\n            /**\n             * Returns undefined when field value is valid;\n             * otherwise return a string describing the error.\n             * This string is meant to be rendered as validation error\n             * below the field.\n             */\n            const isValid = computeIsValid(value);\n\n            if (isValid) {\n              return undefined;\n            }\n\n            return \"The value is not valid.\";\n          }\n        }\n      ]\n    }\n  }\n)\n```\n\n### HookResult\n\n`useForm` returns an object with the following properties:\n\n* `debug` (`() => void`) : print the state of the form.\n\n* `errors` (`null | Record<keyof FormConfig, string>`) : contains validation error for each field in the form; it's `null` if the form is valid (or validation didn't run yet).\n\n* `forceValue` (`(name : string, value : string|string[]) => void, shouldValidate ?: boolean`) : programatically set the value of a field, and trigger validation.\n\n* `valueOf` (`(name : string) => string|string[]`) : return the value of a given field; for checkbox, and select[multiple] it returns a list of values.\n\n* `pending` (`boolean`) : it is true if the submit is in progress - it is recommended to use it to mark the submit button as disabled.\n\n* `onSubmit` (`(handler : Record<keyof FormConfig, string>) => (event : React.FormEvent) => void`) : handles the submit of the form - the actual request is executed by the `handler` defined in user-land.\n\n* `register` (`(name : string, attrs ?: Record<string, string>) => FieldAttributes`) : returns the attributes needed to control the field.\n\n```js\nimport useForm from \"@bscop/use-form\";\n\nfunction App () {\n  const { onSubmit, pending, register } = useForm(\n    // ...\n  );\n\n  const send = (payload) => {};\n\n  return (\n    <form onSubmit={onSubmit(send)}>\n      <div>\n        <label>\n          Email:\n          <input {...register(\"email\", { type: \"email\" })}/>\n        </label>\n      </div>\n      <button disabled={pending} type=\"submit\">Save</button>\n    </form>\n  );\n}\n```\n\n* `resetForm` (`() => void`) : reset the value of all the fields.\n\n* `unregister` (`(name : string) => void`) : reset the state of one (or many) form field that becomes unnecessary.\n\n## Contribute\n\nRead the [guidelines](./CONTRIBUTING.md).\n\n### Run tests\n\n```\nnpm test\n```\n\n### Coverage\n\nCoverage reports are hosted on [codecov](https://codecov.io/).\n\n```\nnpm run badge:coverage -- --token=<guid>\n```\n\n---\n\nBruno Scopelliti\\\nwww.brunoscopelliti.com\n","readmeFilename":"README.md"}