{"_id":"@anb98/react-hooks","_rev":"6-02b255ea5d65c52c1f66c503bebd531e","name":"@anb98/react-hooks","dist-tags":{"latest":"1.3.2"},"versions":{"1.0.0":{"name":"@anb98/react-hooks","version":"1.0.0","description":"Custom hooks for react","main":"./dist/index.js","scripts":{"lint":"eslint src/**","lint:fix":"eslint src/** --fix","build":"tsc -b","test":"echo \"Error: no test specified\" && exit 1","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/Anb98/custom-react-hooks.git"},"keywords":["custom","hooks","react"],"author":{"name":"Abdiel Martinez"},"license":"ISC","bugs":{"url":"https://github.com/Anb98/custom-react-hooks/issues"},"homepage":"https://github.com/Anb98/custom-react-hooks#readme","dependencies":{"axios":"^0.21.1"},"devDependencies":{"@types/jest":"^26.0.20","@types/node":"^14.14.31","@types/react":"^17.0.2","@types/react-dom":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.27.0","@typescript-eslint/parser":"^4.27.0","eslint":"^7.29.0","eslint-config-airbnb-typescript":"^12.3.1","eslint-plugin-import":"^2.23.4","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.24.0","eslint-plugin-react-hooks":"^4.2.0","typescript":"^4.2.3"},"gitHead":"7f908fae013dd2b3e934a651356a4440bb6980a7","_id":"@anb98/react-hooks@1.0.0","_nodeVersion":"12.0.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-SvMPaTw75FP/+8cxuyawHXfyxym7npTPXwBrIplf7iVoAs4YxssDP9CCQFeeMszEE34hSysTaDyCd80bbSV7Yg==","shasum":"f50f9b89ee4273be2755b87839b9d5048da846df","tarball":"https://registry.npmjs.org/@anb98/react-hooks/-/react-hooks-1.0.0.tgz","fileCount":29,"unpackedSize":44881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4sghCRA9TVsSAnZWagAACzMP/2sWrhc0j+Tc62Xz8ND6\nV/mzcCXezzkpCmLI//Ycgzh2Wh4OhCSz3OD/PGsET+Ol6qDTL5K00O8+94N0\n7Pshp9wTy66VF9cBn0XON2Va7uPmNgto33sOJnVM5SlF7VViTeAJjQsqGfk9\nRFXSuU2LETtDndVEQiHTpqcjqLB2Tv5OqUrWA+0u5MBC6LVAvQNBT1BiKmrK\nqmO/PGJf/sjlFyBT1Le4lFsfLBBABaCfCRatAGKEFzKBdGeY0/KrOm2cqjvO\nibWxn7GfUjto0A7Ohv48PAx8Uuq8ZpuPUi984L5AuKfCOEG+WtiHFqKj9xxl\nEKcKfZcJcYlqD0IGHc3EC6h8JDFYY2VeHTcQ14umTh5fU9b8WPm9S1lUm8K7\nsxmc16UXn9cqd6BRTOZA/cZKmCTzpstmqeoWVfBt34R7+CZf5qZgQ1fu2oBm\nDJxdNtBhcFkCc9mNrEIZaLQZrUa5mwrezdjdvK7VFcGMBrhPHXhuop0Q56LK\nqLvAnBdmdRsHV3Nghq63uF2R5kEmE3ZW7Gu9g/Z1fhZRohPYIHYOMJjw8ZF6\nMrJCh4ReyNE2pHahHi6ziM46E8j/v9xOD4hYLPhgkDnCyvUVRDmDH6/FN7Yt\nND5oCKKRhzBoh7MIUkDJ6g+UwVot0T+vjUhjfBUefYb/9bX5unizV3xmznpI\nHGcK\r\n=aMOa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF7FhRcsFSyS9pvfu9Ql9jxAN8W3jBpnRS8xJKf4Zz7mAiAuBqBMIR/hfK0GO0WUFYGddneSlr7R4U32AxT9KVZXCg=="}]},"_npmUser":{"name":"anb98","email":"abdielantonio13@gmail.com"},"directories":{},"maintainers":[{"name":"anb98","email":"abdielantonio13@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks_1.0.0_1625475104996_0.5397564967396198"},"_hasShrinkwrap":false},"1.1.0":{"name":"@anb98/react-hooks","version":"1.1.0","description":"Custom hooks for react","main":"./dist/index.js","scripts":{"lint":"eslint src/**","lint:fix":"eslint src/** --fix","build":"tsc -b","test":"echo \"Error: no test specified\" && exit 1","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/Anb98/custom-react-hooks.git"},"keywords":["custom","hooks","react"],"author":{"name":"Abdiel Martinez"},"license":"ISC","bugs":{"url":"https://github.com/Anb98/custom-react-hooks/issues"},"homepage":"https://github.com/Anb98/custom-react-hooks#readme","dependencies":{"axios":"^0.21.1"},"devDependencies":{"@types/jest":"^26.0.20","@types/node":"^14.14.31","@types/react":"^17.0.2","@types/react-dom":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.27.0","@typescript-eslint/parser":"^4.27.0","eslint":"^7.29.0","eslint-config-airbnb-typescript":"^12.3.1","eslint-plugin-import":"^2.23.4","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.24.0","eslint-plugin-react-hooks":"^4.2.0","typescript":"^4.2.3"},"gitHead":"e1a7f9c7d212a667ca5204ec49c12cb10faa8874","_id":"@anb98/react-hooks@1.1.0","_nodeVersion":"12.0.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-c9WtOHIK/7NSJbV7NJs+JMHmLvcdNXMvNcePxVGkNUS5g4wrqNpncqnFu8PybqvTcbYB1VuK+UORo2uTL4lbug==","shasum":"4078f00b0230b2d159880155cfae872b310d4765","tarball":"https://registry.npmjs.org/@anb98/react-hooks/-/react-hooks-1.1.0.tgz","fileCount":29,"unpackedSize":46996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg84x2CRA9TVsSAnZWagAA+dUP/2bk6beXHr4F/DtGNnbr\n5e8lRRUsasXTD5Hug1GieZTZ7E/h9v6+2aNvs5yDhyYzA2knnitXTE5cEu4f\nHgFk/G8nTwxKCx+UYvgN/9FfT6IeG8zdMzPMmbYdLtxGjU8AjeXrj86NCYOk\nQyeDsrL4aTHcFI5S9bLuFAr4Mc7xI8o9GFh3/MxSW8zeVvBALpsEwLSMndnm\ni4aTccfB1ZFLmXOvSB7lfbs0TZLy8+kx8PFpWHB+brPu6xhWCxtc6CgDyxkE\n8Bil9Mp2q58oilbPU6t0z1m1zoUMxDLJ/F/sxcrjGwZrQU9TzmwWaojuswiW\nxE5L7nl3IxJzjGVplZY2gPofT0wYP5p/QPmtJ3EGWIhmIl3iUrcer22Oo1zr\njA+Q5wMXEjUz5cz+2Lb0XFs/QMI2vrZzhj0GiOYiy6j4myAYY3t7qwpuPNqv\n2v0jhk2INELJHn4IXqgLRtWvc0PsC5u8rkojyxGdEDzasgWRmbKp215La3Ve\nRWdM8mhdZrQ7RCq3+QsgS4p+pqyl7VAPd1hTmWM+HIHFhFEjKwGwxxyM5Vj3\nLl5feVFM+yeCZ02NmQ2MQIQcoPGMChp0KGyJbhoY4N+SPteiaFqI/Z701efa\nVjGwMPx5JVQoE+Q5HBAl+MWJ+wk4uxSDlK4iFSy2K7zIQlx+s5Go7HCHL3fl\n5wsq\r\n=feh2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9Kx3dgQEeddYDUsSIvcl+IgmfGCrYyghBlmD3rqAb/gIgeZctTtJ0y5rK3dPW8yCSa00JWPq9BA6bTtOyiSytC2s="}]},"_npmUser":{"name":"anb98","email":"abdielantonio13@gmail.com"},"directories":{},"maintainers":[{"name":"anb98","email":"abdielantonio13@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks_1.1.0_1626573942216_0.09970253503238635"},"_hasShrinkwrap":false},"1.2.0":{"name":"@anb98/react-hooks","version":"1.2.0","description":"Custom hooks for react","main":"./dist/index.js","scripts":{"lint":"eslint src/**","lint:fix":"eslint src/** --fix","build":"tsc -b","test":"echo \"Error: no test specified\" && exit 1","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/Anb98/custom-react-hooks.git"},"keywords":["custom","hooks","react"],"author":{"name":"Abdiel Martinez"},"license":"ISC","bugs":{"url":"https://github.com/Anb98/custom-react-hooks/issues"},"homepage":"https://github.com/Anb98/custom-react-hooks#readme","dependencies":{"axios":"^0.21.1"},"devDependencies":{"@types/jest":"^26.0.20","@types/node":"^14.14.31","@types/react":"^17.0.2","@types/react-dom":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.27.0","@typescript-eslint/parser":"^4.27.0","eslint":"^7.29.0","eslint-config-airbnb-typescript":"^12.3.1","eslint-plugin-import":"^2.23.4","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.24.0","eslint-plugin-react-hooks":"^4.2.0","typescript":"^4.2.3"},"gitHead":"e1a7f9c7d212a667ca5204ec49c12cb10faa8874","_id":"@anb98/react-hooks@1.2.0","_nodeVersion":"12.0.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-f0Su5VWTiU7n4dMYnlcZVCiPfNYnV7xcbw3zAW5UNHQAkIUnCUR8c/QQYAZXp42KiSphQPu57tKVvWEtoboBDg==","shasum":"f805845990c6ce04256aa3e34d4e91a3b4461bef","tarball":"https://registry.npmjs.org/@anb98/react-hooks/-/react-hooks-1.2.0.tgz","fileCount":29,"unpackedSize":44825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhx7aUCRA9TVsSAnZWagAAhsAP/i6aaGvBKQGkYqguMug9\n0Fe+REF3y23Z37n8ORv1dCGg/fZYnbrmkPidYjUQbioKbUzUklLprr2xaPly\nUofk+QTXUOaSDhPxqSn+BhURK+oJ0n2udf3lzLTEaRcXOYq4jKwlkpEQy6mR\nks5dlpGbpnHQZUJP9Aacj61wjqoIQPcYe3HIDq3GtxduIaUjIEEEl4tVmQTw\nAw9m8au9Krk2v8kGFMz/Te8otcOTDx2NZMlcMJx2/UamKycQY0ydEY7XQR2E\na+MKsPjdk999FNWVpsf0dvEJBFj+fdGyA6seq94JtA2MhX15eyCcGwhyuag9\nR6utjImnQmm+WbrsWsajYPHCYISKaTbXuOdj1SP+ROh/1TSmLObUzKYk9Jlt\nFK2qEEDBw4DY8lHqhlZww3vdKFJSe1jVAH7SOeQWPiqyDUSmC8YPnOUXX1Kr\nhsDiBmHBMkHVgbzeNbSzeI159qj6aS1ysSBZsGdeCpb2BPwwi9FUKu31AIwm\n2/inQ1FfZ5/Sbqy4WxkBUMuDdSPm1uJWRmlIMKVSKqZZM25AaWlLc653Xvet\n/5Rhn2sVch2ZRjTXnBojIwvXUR/6zZ2+CXSd5A/7smGiFVggrM9MtAcj7Xao\nRpkh3ws/HFKH/HFDjOutHyLkKZcgDVOhvEZW+eR6fkBQ1SrP2PX3zccejZvN\n5F1m\r\n=8nNm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAnjvzdV1QyzdpVjlBjFRhI8MqgAkQ/MdQuEtpL3Vqy8AiAxukpzIIalbHqy+MQ6hLHHooq5OdajQQz+6rLNaHy+9Q=="}]},"_npmUser":{"name":"anb98","email":"abdielantonio13@gmail.com"},"directories":{},"maintainers":[{"name":"anb98","email":"abdielantonio13@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks_1.2.0_1640478356055_0.8182517441698074"},"_hasShrinkwrap":false},"1.3.0":{"name":"@anb98/react-hooks","version":"1.3.0","description":"Custom hooks for react","main":"./dist/index.js","scripts":{"lint":"eslint src/**","lint:fix":"eslint src/** --fix","build":"tsc -b","test":"echo \"Error: no test specified\" && exit 1","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/Anb98/custom-react-hooks.git"},"keywords":["custom","hooks","react"],"author":{"name":"Abdiel Martinez"},"license":"ISC","bugs":{"url":"https://github.com/Anb98/custom-react-hooks/issues"},"homepage":"https://github.com/Anb98/custom-react-hooks#readme","dependencies":{"axios":"^0.27.2"},"devDependencies":{"@types/jest":"^28.1.3","@types/node":"^18.0.0","@types/react":"^18.0.14","@types/react-dom":"^18.0.5","@typescript-eslint/eslint-plugin":"^5.29.0","@typescript-eslint/parser":"^5.29.0","eslint":"^8.18.0","eslint-config-airbnb-typescript":"^17.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-jsx-a11y":"^6.5.1","eslint-plugin-react":"^7.30.0","eslint-plugin-react-hooks":"^4.6.0","typescript":"^4.7.4"},"gitHead":"783d4fbfe3cc34eb4fd52453f164ba95081fa11d","_id":"@anb98/react-hooks@1.3.0","_nodeVersion":"14.19.3","_npmVersion":"6.14.17","dist":{"integrity":"sha512-8a/O9+cX0Hh0WJxJq3+QPpgfTthQBMtyMgMK0prvc4slWl6NOZ+v48zqJysLKrhN4iMKSMATnu7dfZpHklSJcA==","shasum":"0a39881b3b6f74130e8e92299d7f344c143b84bb","tarball":"https://registry.npmjs.org/@anb98/react-hooks/-/react-hooks-1.3.0.tgz","fileCount":29,"unpackedSize":50173,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGpFwwRPu05OA0aS/wI4JoVRm/3oWNvScfDoq2AAfkXyAiBcSM0RfSrMwRPNZ+BHq0BSKB8/Rd16D4reFvHHqkLgNA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitKx9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoM4w/9E4RbjrZiwNDSh+dceARzvB4nDHt9Tir0kc9jHga7uaJlm+3R\r\n2zzKfyagr38kme+7KtaDg/eQApZ6pmeEvLVVhApcmwmhQIBXJ/4aPNuSTSlv\r\nzx7smouWvidbRI4I1uXe0soxfrlpIwXmjL42hhgiRDHRwds4N99NsglTp/TO\r\ncv9fiY+xTw6YcKvdc1J6Pb3cLARIOp/kod5FeTfMI5++R1bhXG06mi/BIRx6\r\njXW0NOJ4HKS/9ABLJ0ObRKLxwkQFl/espl/EFzjkFyezzVvdAXTCF6hblomw\r\nYlByESEL7f/XYcor/hr30Tx5ujaXD8UB0CaM8Dwrx+3Kdd7OnzXMkUBr8NBA\r\nh3g1C4IcltdSDIfA9RXAujyo1rC71CMEZa15m84RbZHuGymJMgpZjL1MGI7x\r\ng7nfz1dLuU7H+C29dN60ksB4Gy0Wx7l2fkvhBcm+dLpX390jUVXZPHPXCenm\r\nHQrfgVvBF/lFYJo3T1eckQ89yuLJD6nZHYKkIXJhc0LPuoLIG7yZYZS0/npV\r\n9dbJfiSHQ5RTHyfazFsTAvy5YZMGMkPu1kI4CB5Y7KyXQJWRJmD+HKCJmM6u\r\njigywbfp8QQZ6JffaEImHNbhlJ/VzOC0cjN2pzrtD+xJXf2GlUYUdlpMTn5g\r\nggxhzuHunrNap9QWCTwmkeXHmi6Qr4pm9HI=\r\n=QFi0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anb98","email":"abdielantonio13@gmail.com"},"directories":{},"maintainers":[{"name":"anb98","email":"abdielantonio13@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks_1.3.0_1656007805330_0.3520071916650651"},"_hasShrinkwrap":false},"1.3.1":{"name":"@anb98/react-hooks","version":"1.3.1","description":"Custom hooks for react","main":"./dist/index.js","scripts":{"lint":"eslint src/**","lint:fix":"eslint src/** --fix","build":"tsc -b","test":"echo \"Error: no test specified\" && exit 1","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/Anb98/custom-react-hooks.git"},"keywords":["custom","hooks","react"],"author":{"name":"Abdiel Martinez"},"license":"ISC","bugs":{"url":"https://github.com/Anb98/custom-react-hooks/issues"},"homepage":"https://github.com/Anb98/custom-react-hooks#readme","dependencies":{"axios":"^0.27.2"},"devDependencies":{"@types/jest":"^28.1.3","@types/node":"^18.0.0","@types/react":"^18.0.14","@types/react-dom":"^18.0.5","@typescript-eslint/eslint-plugin":"^5.29.0","@typescript-eslint/parser":"^5.29.0","eslint":"^8.18.0","eslint-config-airbnb-typescript":"^17.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-jsx-a11y":"^6.5.1","eslint-plugin-react":"^7.30.0","eslint-plugin-react-hooks":"^4.6.0","typescript":"^4.7.4"},"gitHead":"626b471c51a6e817c47d8cf5edee95f82fc9bf02","_id":"@anb98/react-hooks@1.3.1","_nodeVersion":"14.19.3","_npmVersion":"6.14.17","dist":{"integrity":"sha512-5Z+2KgpUFqT1Ub3yLSFYbNtuPoduddh8Tea08BbXHuFE2jgOEZy/rnBnI4EcANWfC1BpY7FfkTMTMyUXzY/adQ==","shasum":"f2108e3b54014ce2edcd5b8ce7d47b8e1b95c0d6","tarball":"https://registry.npmjs.org/@anb98/react-hooks/-/react-hooks-1.3.1.tgz","fileCount":29,"unpackedSize":49989,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCf2BCyHhSWhlsb32JklySuuNcR6KKqZFjZDXOYEQD6lAIgfW9lYyy3wNl5YTkyGWOwiu3hmFCaA8P74cBl9shP+14="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu4naACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofbRAAkt0tAqz8AHWKGBa8rUFiRKq6DkJy9lFHqv1cKd47/SmgcF5E\r\nPMMbQUQGwRFpTv9mVmJB2A6P1NcmZNJYxEDRM0F6gef0rey9KfFewR2kXmp9\r\nWSydLn6uYnVmeaPZ5QrtbMJzZS/rPF8E9emxqKRCJRH4uS3W5q1upflA3zb6\r\np1u8kbq4FsrozwlnQWGoY7cfsJp/RrNJGIyX1UL4Ih2Z+EL5vnQHAJdhbq3R\r\npy0XhBrXd7tkuQ9xDjkU1qDUcq4Y7tj4HJtRfszd0mHFglJnC1rzS0xS0TTs\r\n4CvPD+SyWbBsq/JEINN1xb6yMi3QH0DwVgB8GqEIKN1bQxKi0LAub/dotDRc\r\nfQgvEe2TE8knJozxGHD83hCl9ZwcMQ/qUgjGTQaq6kwVWk72iTrViPr2BWjz\r\nlMyozAKgrUuZbgLdwrIn6Ps/mgPVBJRhW8S25/bF5UYi9eELx7f0fgN6qQuq\r\nATPw3yvuM1emATpz9mZsdkaYkseu4Jnc2iq5UtJG6AedjMwdWTsSbAmt32UY\r\nkA92l/8Bk0ioWxGhS+Aa1tl+Gj33rxR1c1Z90lvD7Sp7UqAT7upT3rxSS73V\r\nT2P+yLCXM1pF+wQfD6EMbjSrChpQkkzLE3ZBcAI8B7+3A0L46tgv08vmVDEg\r\nB8w3yu8bxjdFHyYq1TGNRp430sraV9r/Q3A=\r\n=Dpeo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anb98","email":"abdielantonio13@gmail.com"},"directories":{},"maintainers":[{"name":"anb98","email":"abdielantonio13@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks_1.3.1_1656457689830_0.9782264382609336"},"_hasShrinkwrap":false},"1.3.2":{"name":"@anb98/react-hooks","version":"1.3.2","description":"Custom hooks for react","main":"./dist/index.js","scripts":{"lint":"eslint src/**","lint:fix":"eslint src/** --fix","build":"tsc -b","test":"echo \"Error: no test specified\" && exit 1","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/Anb98/custom-react-hooks.git"},"keywords":["custom","hooks","react"],"author":{"name":"Abdiel Martinez"},"license":"ISC","bugs":{"url":"https://github.com/Anb98/custom-react-hooks/issues"},"homepage":"https://github.com/Anb98/custom-react-hooks#readme","dependencies":{"axios":"^0.27.2"},"devDependencies":{"@types/jest":"^28.1.3","@types/node":"^18.0.0","@types/react":"^18.0.14","@types/react-dom":"^18.0.5","@typescript-eslint/eslint-plugin":"^5.29.0","@typescript-eslint/parser":"^5.29.0","eslint":"^8.18.0","eslint-config-airbnb-typescript":"^17.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-jsx-a11y":"^6.5.1","eslint-plugin-react":"^7.30.0","eslint-plugin-react-hooks":"^4.6.0","typescript":"^4.7.4"},"types":"./dist/index.d.ts","gitHead":"b16aac853803d771a7afcc88c2787b94c39ecaf3","_id":"@anb98/react-hooks@1.3.2","_nodeVersion":"16.16.0","_npmVersion":"8.14.0","dist":{"integrity":"sha512-0aZyB1yyZfrnFnxJrZKOiP8cSPFk/GFfPluE8kpSc92v0TGV8dbEw0S8N4sD+W84qt4uvWWOrFMCEbuUkMib+A==","shasum":"cc2b4672fb471e0e160fd2a44fc321ecb22829c4","tarball":"https://registry.npmjs.org/@anb98/react-hooks/-/react-hooks-1.3.2.tgz","fileCount":29,"unpackedSize":51753,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIc7U1PidYtnIN2KcJ+IqRR3Y+mIPeKiEWCqsf2tw//wIhAMYxU12TNDA8Rk68cD8rZ4yjQZ2QqKUoQXqcz8y3DaHI"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCyKmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqO9A//bF08gmQlfu03jVGZMH/febq/NmLdOIv8crnLdpZsnwqOUfWB\r\nQcZQTa1XchW8BOycwJ3ID85Po/1X/GgIfXg4YWaiu+Zk1GF7T5fpfgyiUQYC\r\nIg3/oOUyrBN+Ui/W+LN5SDR+w456ZvQUlY373zg4nhGke6xS3jxwETQHPYSi\r\nnGGEUbKZswd2ZmMPSFIcY0RMwiT1l4UMVSnzEkdNupYprtmJIXB6fKCKLLRN\r\nL/10/0w9fuchHiBn3Zx7Pdxuy8aLBSZLamrqQJYaDqW7F8APE2i2aznz9DQ+\r\nf5p67FAhYmqApHfOUCwYBDlbRC3Ltr2ABU/2HN4nQbKYaAcFXm4jCjN1AdeU\r\nq8UG9N/zu0c4BZU6lX8ZepBCivjL3wXL6SIESpjzwRfsUeSipSVNOESNJ7cE\r\nn6T63/KyrIXLAEeG4E/B9aWIDOLJQMOUfoYbpIxLIwwlg3n7VWcaLMiuWgBe\r\nV3rptbx57GFhxMg8ecrP8KwTuHVpGpECIz/Z/03A3+HQ+vbhn2XCxxk0uknS\r\nAVCNfVxZx2PWJM9AWNBA9qEWJg/BjA5KxrjoAJOCFG98HnuHezCpLrAQzlFA\r\nbD61DMxBw2XVahedK04iF/28SHIVroQmdxkCJpyD24yFyAHzcFPioSjyMxYG\r\nBUL6ET9RAQxtjjL8LfYL3X/yI7mYkdKbX5I=\r\n=VbA/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anb98","email":"abdielantonio13@gmail.com"},"directories":{},"maintainers":[{"name":"anb98","email":"abdielantonio13@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks_1.3.2_1661674150385_0.7972156111133673"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-05T08:51:44.945Z","1.0.0":"2021-07-05T08:51:45.123Z","modified":"2022-08-28T08:09:10.658Z","1.1.0":"2021-07-18T02:05:42.374Z","1.2.0":"2021-12-26T00:25:56.217Z","1.3.0":"2022-06-23T18:10:05.502Z","1.3.1":"2022-06-28T23:08:10.103Z","1.3.2":"2022-08-28T08:09:10.574Z"},"maintainers":[{"name":"anb98","email":"abdielantonio13@gmail.com"}],"description":"Custom hooks for react","homepage":"https://github.com/Anb98/custom-react-hooks#readme","keywords":["custom","hooks","react"],"repository":{"type":"git","url":"git+https://github.com/Anb98/custom-react-hooks.git"},"author":{"name":"Abdiel Martinez"},"bugs":{"url":"https://github.com/Anb98/custom-react-hooks/issues"},"license":"ISC","readme":"# Hooks\r\n\r\n## Table of Contents\r\n* [Installation](#Installation)\r\n* [setGlobals](#setGlobals)\r\n* [useLazyFetch](#useLazyFetch)\r\n* [useFetch](#useFetch)\r\n* [usePromise](#usePromise)\r\n* [useFetchCache and useLazyFetchCache](#useFetchCache-and-useLazyFetchCache)\r\n* [useSearch](#useSearch)\r\n## Installation\r\n```cmd\r\nnpm i @anb98/react-hooks\r\n```\r\n\r\n## setGlobals\r\nThis function allows you to set globals options for `useFetch`, `useFetchData`, `useLazyFetch` and `useLazyFetchCache`\r\n\r\n### Usage\r\n```js\r\nimport { setGlobals } from '@anb98/react-hooks';\r\n\r\nsetGlobals({\r\n    baseURL: 'http://your-base-url',\r\n    headers: {},\r\n    withCredentials: true,\r\n})\r\n```\r\n\r\n> *You don't need to set `/` at the end of `baseURL`\r\n\r\n### setGlobals options\r\n|Property|Description|Type|Default|\r\n|-|-|-|-|\r\n| baseURL | It sets base url to be concatenate with url of useDataApi options | `string` | `''` |\r\n| headers | Request headers |  `any` | `null` |\r\n| withCredentials | Enable cookie credentials | `boolean` | `false` |\r\n\r\n\r\n## useLazyFetch\r\nThis hook is a wrapper for [`usePromise`](#usePromise) hook which consumes an API when calling the handler function.\r\n\r\n### Usage\r\n```js\r\nimport { useLazyFetch } from '@anb98/react-hooks';\r\n\r\nconst options = {\r\n    url: 'http://your-endpoint-url',\r\n    initialData: {},\r\n    request: { headers: { example: 'test'} },\r\n    onCancel: () => {},\r\n    onComplete: (data, err) => {},\r\n    onFail: (err) => {},\r\n    onSuccess: (data) => {},\r\n};\r\n\r\nconst TestComponent = () => {\r\n    const [{ \r\n        data,\r\n        error,\r\n        isError,\r\n        isLoading,\r\n        isSuccess,\r\n        status,\r\n    }, fetchData, resetState, cancelFetch ] = useLazyFetch(options);\r\n    \r\n    const getData = () => {\r\n        const fetchDataOptions = {\r\n            body:{},\r\n            headers: {},\r\n            method: 'post',\r\n            params: {},\r\n            url: '',\r\n            withCredentials: true\r\n        }\r\n\r\n        fetchData(fetchDataOptions);\r\n    };\r\n\r\n    return (<button onClick={getData}>test</button>);\r\n};\r\n\r\nexport default TestComponent;\r\n```\r\n\r\n### Initial options\r\n|Property|Description|Type|Default|\r\n|-|-|-|-|\r\n| url | Initial URL to request | `string` | `globals.baseURL` |\r\n| initialData | Initial data to return as result | `any` | `null` |\r\n| request | Request config object axios | [`Request config axios`](https://github.com/axios/axios#request-config) | `{}` |\r\n| onFail | Callback called when request fails | `function(err)`| `()=>{}` |\r\n| onSuccess | Callback called when request fails | `function(data)` | `()=>{}` |\r\n| onComplete | Callback called when request completes | `function(data, err)` | `()=>{}` |\r\n| onCancel | Callback called when request cancels | `function()` | `()=>{}` |\r\n\r\n### Returned state\r\n|Property|Description|Type|Default|\r\n|-|-|-|-|\r\n| data | Result of the request | `any` | `initialData` |\r\n| error | Error of the request | `any` | `null` |\r\n| isError | It shows if the request fails | `boolean` | `false` |\r\n| isLoading | It shows if the request is loading | `boolean` | `false` |\r\n| isSuccess | It shows if the request completed successfully | `boolean` | `false` |\r\n| status | It shows the request's status | `idle` \\| `pending` \\| `resolved` \\| `rejected` | `idle` |\r\n\r\n> `resetState` function will reset returned state to initial state.\r\n\r\n> `fetchDataOptions` options uses type [Request config from axios](https://github.com/axios/axios#request-config)\r\n## useFetch\r\nThis hook consumes API when component is mounted and also when calling the handler function.\r\n\r\nBy default it request with `GET` method unless you change `initial options`.\r\n\r\nThis hook is a wrapper for [`useLazyFetch`](#useLazyFetch).\r\n\r\n\r\n### Usage\r\n```js\r\nimport { useFetch } from '@anb98/react-hooks';\r\n\r\nconst options = {\r\n    deps: [],\r\n    initialData: {},\r\n    request: { headers: { example: 'test'} },\r\n    onCancel: () => {},\r\n    onComplete: (data, err) => {},\r\n    onFail: (err) => {},\r\n    onSuccess: (data) => {},\r\n};\r\n\r\nconst TestComponent = () => {\r\n    const [{ \r\n        data,\r\n        error,\r\n        isError,\r\n        isLoading,\r\n        isSuccess,\r\n        status,\r\n    }, fetchData, resetState, cancelFetch ] = useFetch('http://your-endpoint-url', options);\r\n    \r\n    const getData = () => {\r\n        const fetchDataOptions = {\r\n            body:{},\r\n            headers: {},\r\n            method: 'post',\r\n            params: {},\r\n            url: '',\r\n            withCredentials: true\r\n        }\r\n\r\n        fetchData(fetchDataOptions);\r\n    };\r\n\r\n    return (<button onClick={getData}>test</button>);\r\n};\r\n\r\nexport default TestComponent;\r\n```\r\n> `URL` first param is mandatory\r\n\r\n### Initial options\r\n|Property|Description|Type|Default|\r\n|-|-|-|-|\r\n|deps| Dependency list to run hook | `Array<any>` | `[]` |\r\n\r\n## usePromise\r\nThis hook executes a `Promise` when calling the handler function.\r\n\r\n### Usage\r\n```js\r\nimport { usePromise } from '@anb98/react-hooks';\r\n\r\nconst promise = (example, test) => Promise.resolve({ example, test });\r\n\r\nconst options = {\r\n    deps:[],\r\n    params: ['example', 'test'],\r\n    initialData: {},\r\n    onComplete: (data, err) => {},\r\n    onFail: (err) => {},\r\n    onSuccess: (data) => {},\r\n    onUnmount: ()=>{},\r\n};\r\n\r\nconst TestComponent = () => {\r\n    const [{ \r\n        data,\r\n        error,\r\n        isError,\r\n        isLoading,\r\n        isSuccess,\r\n        status,\r\n    }, promiseHandler, resetState ] = usePromise(promise, options);\r\n    \r\n    const getPromiseResult = () => {\r\n        promiseHandler('example', 'test');\r\n    };\r\n\r\n    return (<button onClick={getPromiseResult}>test</button>);\r\n};\r\n\r\nexport default TestComponent;\r\n```\r\n> `promise` function param is __mandatory__\r\n\r\n> `handlerOptions` are passed to `promise` function; otherwise it passes `params` from `initial options`\r\n\r\n> `resetState` function will reset returned state to initial state.\r\n### Initial options\r\n|Property|Description|Type|Default|\r\n|-|-|-|-|\r\n|deps| Dependency list to run hook | `Array<any>` | `[]` |\r\n|params| Default params to use in promise handler | `any[]` | `[]` |\r\n| initialData | Initial data to return as result | `any` | `null` |\r\n| onFail | Callback called when promise fails | `function(err)`| `()=>{}` |\r\n| onSuccess | Callback called when promise success | `function(data)` | `()=>{}` |\r\n| onComplete | Callback called when promise completes | `function(data, err)` | `()=>{}` |\r\n| onUnmount | Callback called when hook is unmounted | `function()` | `()=>{}` |\r\n\r\n### Returned state\r\n|Property|Description|Type|Default|\r\n|-|-|-|-|\r\n| data | Result of the request | `any` | `initialData` |\r\n| error | Error of the request | `any` | `null` |\r\n| isError | It shows if the request fails | `boolean` | `false` |\r\n| isLoading | It shows if the request is loading | `boolean` | `false` |\r\n| isSuccess | It shows if the request completed successfully | `boolean` | `false` |\r\n| status | It shows the request's status | `idle` \\| `pending` \\| `resolved` \\| `rejected` | `idle` |\r\n\r\n\r\n## `useFetchCache` and `useLazyFetchCache`\r\nThis hooks allow to cache results from request previously fetched.\r\nTo use this hooks you first need `CacheProvider`.\r\n\r\n```js\r\nimport { CacheProvider } from '@anb98/react-hooks';\r\n\r\nconst App = () => (\r\n    <div className=\"App\">\r\n        <CacheProvider>\r\n            <Main/>\r\n        </CacheProvider>\r\n    </div>\r\n);\r\n```\r\n\r\n> All the options and returned values for `useFetchCache` and `useLazyFetchCache` are the same  from `useFetch` and `useLazyFetch` respectively.\r\n\r\n> To refresh the next request you can add `{ refresh: true }` as second param when calling handler.\r\n\r\nExample:\r\n```js\r\n<button onClick={()=>handler({}, { refresh: true })}>\r\n    Fetch Cache\r\n</button>\r\n```\r\n## useSearch\r\nThis hook filters results when searching.\r\n\r\n### Usage\r\n```js\r\nimport { useSearch } from '@anb98/react-hooks';\r\n\r\nconst options = {\r\n    allowFields: [],\r\n    denyFields: []\r\n    sourceData: []\r\n};\r\n\r\nconst TestComponent = () => {\r\n    const {\r\n        setSourceData,\r\n        setSearchValue,\r\n        filtered,\r\n        sourceData\r\n    } = useSearch(options);\r\n\r\n    return (\r\n        <div>\r\n            <input type=\"text\" onChange={(evt)=> setSearchValue(evt.target.value) } />\r\n\r\n            <ul>\r\n                {\r\n                    filtered.map((el)=>(\r\n                        <li key={el.id}>{JSON.stringify(el)}</li>\r\n                    ))\r\n                }\r\n            </ul>\r\n        </div>\r\n    );\r\n}\r\n```\r\n\r\n### Initial options\r\n|Property|Description|Type|Default|\r\n|-|-|-|-|\r\n| allowFields | Fields in which search | `Array<string>` | `[]` |\r\n| denyFields | Fields in which not search | `Array<string>` | `[]` |\r\n| sourceData | Source data to search | `Array<Object>` | `[]` |\r\n\r\n### Returned\r\n|Property|Description|Type|Default|\r\n|-|-|-|-|\r\n| setSourceData | Function to set sourceData | `function(Array<Object>)` | |\r\n| setSearchValue | Function to set search value | `function(string)` | |\r\n| filtered | Filtered results from sourceData | `Array<string>` | `[]` |\r\n| sourceData | Previously set source data | `Array<Object>` | `[]` |","readmeFilename":"README.md"}