{"_id":"use-sync-v","_rev":"81-02e367b53b27c793ae21568664d3527c","name":"use-sync-v","dist-tags":{"latest":"2.5.4","alpha":"3.0.5","beta":"3.0.5"},"versions":{"1.0.0":{"name":"use-sync-v","version":"1.0.0","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"gitHead":"b1833c183bd7ba0ebd9ac212a77745c2531bbc05","_id":"use-sync-v@1.0.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-n5xJHAGFNUoO59LM1EyzG2ES4YvUnClDOgkvO9hdNuDpdKGH5GihNnPegHCiu0wXtX3nFF9u3vHpCmUeX/qsTg==","shasum":"8a44f3005d150a0bccbd0fbc15f417286f4babaf","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.0.0.tgz","fileCount":3,"unpackedSize":2525,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNehbBfaXk0FAtjHMB3veKjns+YgWzT5hZt1qHVztgpAiEAgs8ZqxF/RWvj80qanwi0i803suVHYYYQOBv20JMh5YM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHr21ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrsYQ/+IXj2sFJCzpAkhYpm/jqRstgrvEqhqfinHsl5+4kE+u2Aai5W\r\nTy2Ja4HgmLDu9vRw9Kcp8gRM9xoZgH7IhiW66IKxiRQ3XG2y/hrrutpTfxei\r\nd5bsQwPu70rqVQRbcalhbmyZABGjMx9nGXAx2mHso/Uky9/dy6DpZqXaZhGJ\r\n9Hibj8upm8NUiiNRvnrXNsOQqMAX7FYUiHB0nH/feIgw2d/8BNgGSIZ3aDd/\r\n2hYzCwNM+iueFd20HUSAOl8kbWYsbmK7M9LSPTA1KDut9lgFpFGWYQvMVq10\r\nICTzpRPRiPVLwYXM4+d4yT5yPQT9VhENcDphKjsyaJmBJKndINbdfeXr3bXB\r\ncA4wTkYa6dw7PNphE/4tLg/60trgrxZnI9Q9/0n1TDgZ/Hag8whPUbNF7jio\r\n7awngucro+l5+F967HnxMuJ4pKWLoHq6WEwuccVibeQlERoWrjef13AIyEAb\r\nFOFq7RJxU+raR9NSCH3lUf3pbsl+7TEdStByTblRRXHs1MWmAPI3q0DclDgg\r\nEPa45J+l/HXQzIT+3GddurivdTKHPZA1ABJGAHQk5wlmry4vlGCA7mLdD2fB\r\nFWMqAtt7F9b3ekxe0uturSCxuP+HQ1/0UFkmbkGJQsLLAjmmxno1HofL2QYy\r\nlwwlE1kuzklqwLKr52NFVoiBUgCH+4O6nNo=\r\n=XCIs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.0.0_1679736244865_0.17947566175490004"},"_hasShrinkwrap":false},"1.0.1":{"name":"use-sync-v","version":"1.0.1","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"gitHead":"9edfa692def7fd81082a8382563d8191d1e74967","_id":"use-sync-v@1.0.1","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-bgCtuDJpVo5svpHv8ax7akE5t8SB+G+DRjpr3GmBTbAnMnYuAJyjPGsDb7mXGNERvqcNXPeS3JkspDvu64oTIw==","shasum":"2790d9a0d10277c3e1ef5f7e991f681200f1fb70","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.0.1.tgz","fileCount":3,"unpackedSize":6949,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWqJKBa6okjhZCIiqU+Ci5Qa3cXxqy0OUEqVvp92arGwIhAOfrNU6nRpfTxGqqY170ZZtq9g247vSyBm4V0w0YUAVE"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHtt/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2BRAAjpPQ/lcBdgI7SjZt3vCK1a35yGBU+TPo6fSym+px5YmTg1dc\r\nI2NCRVHob46QkJgmt1ImkSH5L4KQaUUybHCvXRnfIU/FvW8wNl+9DuKUG9TD\r\n+3w1iGVEScmZrUM3KORyL8zmbdQBtwo1LA0P4bi8NQ2FrufJTg2h8iwQiQPO\r\n7Erb72v+LuhEPmmo73B0vtRf+PZUQTljvfOqS6XRCL11LS11SAObgGsBq+vk\r\n+uXAQjnJNzT0oEPJvIrGPOGqnpAR/XJFq8xUi8kriqMbOwAaI9jTPWsYhYcK\r\np/Y2v6toIhzWEcDy5O9I0HQXfDBmo9mVP97XxxRFHN5PUz/aQGTmM5ujwTXr\r\nChhN8hB8s+4fEh3cQkm/Lbc8gYDbL3DBpsJqUbYqC0Kw4e3Wkxcls8Zypsug\r\nR+/UnvD8/sNskTJWTinZNeue4qqNPePJTkp+PYL7ZbLC5Y/1CPtOPQIFet5f\r\nlz+WcgFJpo0vzY9g2VzKEoEpqhrzZp8YM2Kmc5BZi8JkLOsJgZr8kICwmwhH\r\nSWwB2MVfI5bEpUGCA+/g5AJ+m0PMtdnzFEd5c5Aygp/aVPAqiHk8g6EprRls\r\nn8UIrncBzfjy7LWsU2FEF6CX2+TeVr8nLDArnyp6VPA6+mk2CUFQN4HBAwvl\r\ncW87op6RXV9NQh46dxzpmh8Giv3ysRCshJ8=\r\n=TDbx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.0.1_1679743871461_0.0002289517564904031"},"_hasShrinkwrap":false},"1.0.2":{"name":"use-sync-v","version":"1.0.2","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"gitHead":"331a74e513baf170c19bb9fa8ca2afde52611f5f","_id":"use-sync-v@1.0.2","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-YaHZfBNJwfXb5sHYRbbYn37hbmupNraLX9T1rwdiY60iflJhbZR3S5Yay9m1motuTuZaMwdhmUQqt2dbfICkFg==","shasum":"2a8a56f2a1c7cb28c11d246715ab7048f4f6dbee","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.0.2.tgz","fileCount":3,"unpackedSize":6943,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBKs66zeCdVyXhsPjU2BAOEnfimIdcJvSWSuyMO2+/YQIgTQqtdh1++gpYUZA3YkyJB5Cgg6v6dP4N0bag3DMEbc8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHtwPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoisg/+PMJQRDXLxaW4toTCFznLyERrGhOUd2LzX9w+wnFU+XDf8lrj\r\nNWh39Tiz3qsCSVTKkNmCdXiMXNLnAA/2ha5kT1uoDhz7BdJHY0QyARlPuTD3\r\nCkxRTG8/hDfZw6y+wSVLn5xOYpWMfK7TGVUGdr26pQJ0DmRX/aetI7yMi56A\r\nl5jK1TyrMZw1pesLLO2H5xqvDCBv0120wryXeJ7iliFhxEHVDqHwUS60K1mI\r\nz5qp1WgqCYiAQUei5gztA9SP/7JVzqAg1hT9sOdTJFW7Lc/PI2VxnBPpRQtK\r\n7QRLe0zlWiaqnwoXDMU9tcb1qA6mklzGypK9gthd11/RfEVtghYng5rO3DRd\r\nKkowGWlKlEapsVYBvJjtLQtTi6H9Jmz1W4g6VS8sT1st9rsLTkexdQ71Fu+G\r\nZB9EvWF3ODrlDK4iaG/9l5BMCCWhypBgllnAY0oWCdpKC/5WVAmHHzWdx22/\r\n+iXojMB7GdYXug/gUaJUT5eI4Bm+kOVZ2ADKMIyuAp3+ZcO6EinvrZpMX+xa\r\nE52ndi3WLrPBHA2r5nBQ4lvSHBFqCvamRVHdd+IVMXjTd0qoDpHJgV0osUD0\r\nJmVXpgd8Vov6EBmI4QdzxN94I+JwEGkpJsSylo62+WLSzr8FLMA9YNiIrXK3\r\npPmOl6MA/nE+T42h3wryyucJ0/l+K6lG+kQ=\r\n=3WZG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.0.2_1679744015486_0.3133645433063039"},"_hasShrinkwrap":false},"1.0.3":{"name":"use-sync-v","version":"1.0.3","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"gitHead":"9bb7adb24379a4ceea1a2a177eb62e073182b98d","_id":"use-sync-v@1.0.3","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-oVa5fVE22Zi/ZRyxB6oHp0slO6hTZsttzJdo/Hn8nMm9sszEQUhR2IlhYcHo3A/E0Pj3ieoJhWnVag3UxePo4Q==","shasum":"c2f839ae8e49fb846e7e30bb6460783b9441ddea","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.0.3.tgz","fileCount":3,"unpackedSize":6837,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEcJkoWIh+1ZfXdMJfmiVGSSQqBpch8LMrpJFhu2kYijAiEArVht0jaO+E8NYKIsDkLvbAzshsslzR29NJa7nm9lEKc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHz5nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnGRAAj/IbcfvQvWEhDQzps3l0CjuRERYRJtapQPCIoWPnOqAtsRbP\r\nNatYgULj5LYc9BtKJDNqRZQJWD8moalIMIjWraO/Q+WFRnP6SrVnDJEt8gwU\r\nVPOBr6NQ4H3/MzpvYvMqti19vu8BnRTInUYDhQavnlUNVmkRKmQKcOHOT7Pm\r\nG3flRW4B/7X1L7nUljAJDoSSLdjlg93JeckITxguoWBveT7Q4um5jaAzgivm\r\njADS8GPazdAEM2+D8FWpr8VULRV2myBFcKjAKJV9QLqc6mIDDbg9jXNXsPth\r\n7lQMgD12CtUHlAT+ZmOvyiSraO4LeQf8T950VjEQlUUVvxzapdr+KVcemuzM\r\n6YsiA1PNcKBreSidadIPygWw52oVe/8/jQ53lWAzkqPcgYNEYxRXW0YLSE40\r\n5RqzP1tokNZsKA6YiJM83S4rNC7IrkTc0bOMnrNd2V9KVcTPy5C+z25tBqs2\r\niTALRomiAqoPWxh97Mc2iQNqfa0lCAGwa0nlyzxXsnPkeTqSRwOwDKIIGqC7\r\n+XC3NCreeC/J9BNkew3bQjGu+dSmPjCMRWECqbDgtOsMnwaZHORHrHrNg5uZ\r\neCFurlIiACK3bA/KLVBv18Mqh4MvrejXsrbc8LC/i0JVNx1JivmSCtrmYaBA\r\nNX4xIvZYDJcaIG/jc72NXZ3HSO146C4j+bc=\r\n=ETCV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.0.3_1679769191443_0.7461747056816408"},"_hasShrinkwrap":false},"1.0.4":{"name":"use-sync-v","version":"1.0.4","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"gitHead":"691d3bb92336ce1f7dda92e060b2863e0c0e5e63","_id":"use-sync-v@1.0.4","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-bgvyhSy5C7u5jNziJ9UP+L7Ld0ETuvllxy8uhupTCEhCGlVWK/BB+vhOvTLWQ6gBsyxstbpn/FR7fN4wHXWCQg==","shasum":"96c8b500959305db1480efb1932a8bf8cf17799b","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.0.4.tgz","fileCount":3,"unpackedSize":6837,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFzVvPIs0r9yIepL2YC6vrXpRdFfOepFGr/YGTm8is4dAiEAo/E9I4qtIM5amfQvfJPy+DX0K4CVPfcWnsI+R8pEvV4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkH4SWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7ZQ/9EgafymFIz11M/ybbIDwBOtOQu19OlBTVoPsfmZFn109YqWXD\r\n3VJD2YZNbOpuDVT+wXv1/Gm6cCYChT/dLmnOKrp2+RHulbRrJPYlsAc4eIcQ\r\n4cnmKgZmLxkopppcRvpIPIk2ODAweUScDR843CBecN5TaZ0Z9D9wzPvlR4LY\r\nT4oTgzP6YD6LpK8t+DK+87xsEt6Pwkb5FznnFaaDm8TxEtJqZ2lkaMBmDmDp\r\nTQTVhnQ98oor/xdq2e2vWqTtsyV7ArDXsAnIipH08fOj1AAB0t8PWY0ltFgs\r\njOxRrEBkUdJ27xctECY9pBQZ7aeWyaZXTqkZs3SVWLQhoAjx3Xg8c10yVegQ\r\nDWzN9+CI4x2XlPRPauFH7WaAxS9mrk2GQM8fF6KIwNF4rgmdEJIYWVgupcuP\r\nzsxYt0aLiAlz8JJVxB65Yb2YuleTThKJXgL+ba364ch8IE2DtLGV+SN98GLa\r\nQ+Ajq92mNn5+zR1gzxJF/JxVF6rAdTtYFrdlG8GWTs6QhyVY9wui1KmLekna\r\n+h/qD2Je/cPYMVAG/sCVvNGxAMw3O2+/xPZzZEr8DIlnvpwbKtSWY1Kkj8al\r\nE/7fSjxp2je+gD35XTLK39/zBPaaW8cGfSyp1LfxFOZVudgITJL3gEyuyQMh\r\n19aeND4gwBUMpMwlxTte56GarPM8I5AQsEE=\r\n=bGhw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.0.4_1679787158115_0.7296154429541408"},"_hasShrinkwrap":false},"1.0.5":{"name":"use-sync-v","version":"1.0.5","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"gitHead":"e78a341956ebd836361e40e1cd0862e5175c74cb","_id":"use-sync-v@1.0.5","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-zeAfJAZgUkswjguxJVNboM1jH0LnNiGi8WkCD3+LG/CugONbgK1RlbHuTKX3e78CgWmndziILhPh4pOp/lgUEw==","shasum":"a144a76e7387b33fcd1526be290318f2391dc8f8","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.0.5.tgz","fileCount":3,"unpackedSize":7648,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDVTZkwyX2xjLHDMvCSvG5cTGpWtq69VuByfacVv7iVAIgMd62QttzjmlpQKcSfbVdm76apdhrA+Wc38kb+JM1+gQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkH/gaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoW6A/+KHZGKv7I+wsqMZaCPPg/ZloVbsvS8gGKkip3JULrsITa30L4\r\naSWLBiv5DmvvLJ7EtMkpu+AvmQPIf7sxYh/oId2FamCb9Nd1WO2XicJ7gkTh\r\nqljQLeoBbr6aq5BgBjvONbjNs8TkKvPv20tvFcAe/4Mb6R5EaBB8m01x3rn3\r\nMPL5LJem7MqdbJ/Al/HKK7iXX/+tIeRCzgP1b1SE7wVhQ17AhpTKbE8JZWa4\r\n1o0WxpmFGsZWzWXxBfMauAzPvIsNhhmTCvhnP5zufw6uk/0ysrLLVBmVd2A1\r\nwR3Rxb34ocwz9H/kuSOo99fdCII9gR5wx948aDHaFcPMTSBMbyeHRgvucw7l\r\no+T1s2zpXre787IfOSkoixaGoi7HtZoSVSd1ibb0lIhDP9vU176r2nT2XCi0\r\nAJp1d4VcDdYQurlBy4ODeCcQxq8XUxOk28PINfswtLlvkK/EqM4sz2HmMjkt\r\nseEVkQ168tB+DFz5CAOCvhFCDPMn5+IBbGwKJAG7ZJHRSCbFvXGiZIWBchSd\r\nGCAbydDHVePM51eM0big2OKZ3k+MBHjiolveRWMvapdtI7YCST2WZ0R4k0n2\r\n4OsSTSyl8bGGzcIMor+ddoEtD2V6daGxmAskhrP+bB+dEcy8bDF/zaXMkT5h\r\nrVucuggVTS1rA6i6cKRScjyCMgTtOYQnSms=\r\n=J1sP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.0.5_1679816730640_0.5120407404582947"},"_hasShrinkwrap":false},"1.0.6":{"name":"use-sync-v","version":"1.0.6","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"gitHead":"8df694771201f90a5f3a846d9fe3d2e27778535a","_id":"use-sync-v@1.0.6","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-NcpWNuej99tRb5bxtckHXnrpyyASQjXG1Xa6x7r6yovfAIn3T0rg9wa92DCkr6H8poaFRxGDYZCPeC5UuojXNQ==","shasum":"ac72a9853465ae33678248ec09df1efe636a2359","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.0.6.tgz","fileCount":3,"unpackedSize":11823,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8Qwzv3/pb15x0PJnh9kmoox5UQr3h1UPuQw1kUjVTFwIhAPJV1YicgmrnVVr7ANhWoZrDmsrZCIKd77ixTb2oXpsx"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIUbwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq12g/5AEZj6XtO/3/rZAbA58ifdCqQsmoLZwxZz/azUVNMQwV6fwNv\r\nntK+VP65BHnqPe5JSBLrK2hFjCJjhjSfTeHW+jR9jupt1fa+K2GpxAzoxjlc\r\nX+JZyqgDUHnWg1zRmiDw/4KhVgG547HFUtHqDEdHTQdynrVoECr3zIX1ifib\r\ndtilztv8797/p/yOUXSPqL4VVc1oWb8p/n2uML4DtnoYSnUSDFP9BGIfo3D1\r\ndXi94Fndfo8f2DEyPs7CxhztiXzpCofRCFyA/vXuJRSXMjQMqu1fDQFb9HoP\r\n7Nl0RGPN/KKe2cd3XYFTBhKxoHZ50hnHDMDvmYt9r/OkCLA7H1nV0s0sRYK/\r\nQRwnYfMCbK1BRCbmYyORZ7tZsiiPmyWX3eLW/orxs7P0RQKkyMzJHEkDpjrc\r\nYcv2nkI9wcU6WlR+EIkI8usV6hQv0i9O6G0ZuY+ChzJaxSEcMzmnPqIud2EJ\r\n03TrmPQY5KGFdEUJmDmZSQxJO7ORZuGm0QPm665V8F3p8+0nd0IHGG1y9g1G\r\ntgK96CDhClNVQ6rXy4ZPnmVxFgtBkETiVnXssEne0DqXAxlUD9kS+yIDCGTA\r\nHLAc5L/xRN7CCIpPXRgOuiKFVFG7GOtUJmh7tEGHHYwfYTefQJ2GKbAWhzvk\r\nHPVRhYSXUqjOdj6zAexYk4wUY0nPU69e1yo=\r\n=hoMU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.0.6_1679902448564_0.5908482185898434"},"_hasShrinkwrap":false},"1.1.0":{"name":"use-sync-v","version":"1.1.0","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"gitHead":"0ad21737a403fa2390819c5dbffa88dacae3bd7f","_id":"use-sync-v@1.1.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-Kkf2avQ38Kp+eHyHhlNrLhXw+bOORsK9M7JuAKtGYp0vC6H9zuE4b/Pud8Nzye5IJfsGKnHZxd9wB1AqAY7BCA==","shasum":"c7dc73329904f382fb4a4d26ed4259306d484223","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.1.0.tgz","fileCount":3,"unpackedSize":12504,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFGkLmuJT/Y9hLtci3jGNhcGeJGk94Ul2Dox45BaWphGAiBkj9JSG3D6xtM/C5YJg6wqty5En34EsYJHEcUGb/pSzA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIVhDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnCg/7BA3njD6s20gDbLg6+A8eCNQjEMLRgxj7XJcmO5BAlyiqEBVo\r\n3Uy6YIkEsuMu67411WM1/nPbEM9/FszHaU5intF69YReIcDGdw0o7wFMghtO\r\nZd5CqYBFHn14p2j8RZ1oWx6kiFKqGLuZW6Hb/pPbIVNsrK6MUuAazEfDZhTK\r\nzKjQ1oH03PetVI3P9bv5scTp9EdbbiajI2ZvXfytOxL6gxLDq/BcnXr663kE\r\nlguBa/YeDletGlnF8TJlITcBw3eHUrNiNWGQCvu1d9stC9B18/CXTtymT1sG\r\nORQqiCLVpLxNCHpHh/nyvmp1xLZbOnRnlKKj2HQAfKWXBZLK6fch0zCDHO7w\r\nXTNKLElpf02XASJuwQsQzVgYDDwFs2CjaQ2od3Ffob2WpmKHBrhoxcyHflzB\r\n3zSTlIzRZ6PS+AnZnmS4mZ7IMMXQ5goh0r8WZeciao3oqsY7Ne6nbPA51NT1\r\nA3UsG00UBYSfe+dYmL0bjrvofFulevyAcpJv7FNAdOWjQfgQLiwlkwBFLgvp\r\nKwi7eWxR40n0C2q1E/TnV/1sj+HUJjEv46SzzPZvpoPkVVs7FiMA3SHZsp/I\r\nPCydoczhFJFQ0f8RAiPukVVv+TztxDj4x0hoD4RPytQFjTtRbaBiAAT7kAkK\r\n6UsCvISeTlhGKwbn+PpU9RkoLk/PSC95au8=\r\n=6nQx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.1.0_1679906883410_0.4870108979776875"},"_hasShrinkwrap":false},"1.1.1":{"name":"use-sync-v","version":"1.1.1","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"gitHead":"0ad21737a403fa2390819c5dbffa88dacae3bd7f","_id":"use-sync-v@1.1.1","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-sbw3Iq1SHVNbp8S/Cyvi0TOz1Mzi7NgOoNqW5U0Renq5qCpkQs4qW8h/n5E28FnE/jzuiE6q0ZuRgfKn05P4KA==","shasum":"0357fa0232a48eaf42fe3ee82c26d61f744f9bb8","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.1.1.tgz","fileCount":3,"unpackedSize":12502,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7SBMV/D9fY+VgsN/VeTT8JsmPBtHwilMbDugFb85sHgIhAKBXmYZax+zDCUGwfE1QjASLvnx4dX6vnTbHvvkXapOE"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIVoEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpclA//Tpkz4Zzm4zCYpSAjJbfQX0CkpVTY8eaJJ2TF6T/8dmBJwMvG\r\nWwpU/x4zbkuB9hF4YMH9G5AqQz9R5dFwAjZxxvPdFzsJWuqMMInOjqw3JpY2\r\nlT+6YDizt/ltHJJVjtGuYWWRb5ISOH5/nHzOC5XauZOyCa0Moh2DamK+f3eV\r\nmH4Lt4G7eanFqT/vCzGkwy2snezzBhpkN944dL075iz/tQu9idDsMQgrSXmw\r\n1NF3rM4e4Js4sVitZ3nmvrUonY8Qot7huPUwz3WEszMfPS88oX06qAbCAgVI\r\n7XN6w6CqUGPLqWtOHpCAMxFoHZ6mXP10HmKaiq3q+jNpAj406HTFtd03UI3D\r\n62bq5mpSNJ81fqlIghST5oa9TAeOXROqS4EmyTb5GukpBJTFMaLca3d25uV6\r\nXT5XwqqZf8FHsaB3KUZxv261V9rE026Rt8BrFnKl4F1ZKtom6ST93SL+aWm7\r\n9TFUOMM3+NrgyAqoXc/o88z5L9c2hk4SPLXmB4s72meFOhIvA8OrPJLvWVeW\r\n41KRI6WclFuZaE6/TQveeaQRscMZFCYsXevXXIoai3289ovwJQ+qGrhhdflA\r\nqubjO2zSmVb/LYRTuyqQ1iC9esQ0qbI/DoILM8YqhzRjKfgGflYXbj8Zlah5\r\n+LpZdHCJgSmsjMoPhQDviRO5SgvkhLw3rVE=\r\n=L2KE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.1.1_1679907331936_0.19737296959024797"},"_hasShrinkwrap":false},"1.1.2":{"name":"use-sync-v","version":"1.1.2","type":"module","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"gitHead":"0ad21737a403fa2390819c5dbffa88dacae3bd7f","_id":"use-sync-v@1.1.2","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-x2JMMITVwBhnMTGyc2YuZVtOTifG0Ng19z+pfJpJj1BW9oF9+Qqld0TKbMkJYIrO5Bp90BiavRDL4c2P8NdOMQ==","shasum":"c8fc3f3c9fb7fab7826c0034c290cf7bbfa69939","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.1.2.tgz","fileCount":3,"unpackedSize":12525,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDSgonBvQbAw7xd0yUROLIj2MWiG9DLmWNkXhwsNitDJAiBIBqvacQAn0hj3LJpk1+rc08Wx8qJmbUM9Sw6jjIytrQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIXD9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/+RAAjN6mLMCCf92D2DaCltdiQRr/tBm7W+9VObLC//4tsU5IX/GF\r\nzx6iiJLlJVHO4GXvh9N/fjpGAkOTIq23jaHT22IgauwjbZwGxAagzO7fy8gu\r\n0sEgBihrz6gVyP1NEYjCkSt0R/8j3T8MnLOM1MQCLonVwwpA0Q/Zy3h4dNqN\r\n/fk/dj4uQiEgcGL2b4cG2zcTPpZ9S81Oc5jhk42jN4t650LJROiPeKWx2EbY\r\n4kYG5Fslossz5GPBeyDjOA+jCv9I2Pb1VBY1tHdzLgnp5e7rwFPmpP+OG2UE\r\nGsRs2BD21KHsPYJMHBLhkL95bzxBMgWf/4i3Dc8jvoHO6ZGCtMHQ8zlsMi+z\r\nd+IMcyjGfX+BnfMRJDwileFmL/81J06kZGEcHkp76hOmqVuxYfZ77zZIMGyn\r\nYATiKoOjfJLBrzZdsidK1Plryrr6A5f+Q44XlJnv7tqCsTfLIWQq0FhlxTTb\r\nrs0hEBJ64nlexYfNRjOwRahzUhPjUaGUkuWM+gnKJsliw+06aZIHZAq+y9Zr\r\nzkTYHAtHuwrUTKhpkbyo/muIrQ41lCHpmrNRqbonCZm96iVmYMNKaGgmHtWJ\r\nOcIjENhMbhlAadvV3sLwZ33Om6RUp+IACp4prCZX5aY15Be1fGKcYNp0DAER\r\nKTjLobU1QAPZKLZ6NL3UVKoz+5xJ0B3sRrY=\r\n=8zTh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.1.2_1679913213643_0.3370668704189137"},"_hasShrinkwrap":false},"1.1.3":{"name":"use-sync-v","version":"1.1.3","type":"module","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"gitHead":"f9b8c0393e38d01f997e4d3d1eff5e2d34f3bf0a","_id":"use-sync-v@1.1.3","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-LKyBgKoVZsykIGdn2CEU3nqlT2EE5HR7/50BVx0c4Nh3n0J3uh6vu2dWdoe5OviRAw6DLrw2mUN35QounbwJYQ==","shasum":"ff7dd8883440f05c9d81175596a196d742a01b32","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.1.3.tgz","fileCount":3,"unpackedSize":12529,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3Jme0HSlsGD+SaKEId/mj2DUSplY/oSBoF7xRuXPBAgIgFYYt+c6eFbfQcjN6p/K8Ig5fe3vwSeG2Tf7pimJRIOo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIXG1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlEA//alJ+Mp31t8ZYwa57R0eQN4lCj9y6LDO5vc962Lguoz0XODtk\r\nSsSL/7eL8dgvBmPxsbpVYLSeF0tCYijiizha/gMG2jby78zIXTFQlvROXa0A\r\nXmiKv7qbfCeDygoHrBv6FkvPbuD3rDsMaXWzoM04L0+plufRzTzD/3dqzANl\r\ndLq9UpDCWPm7Og/91SsxVSqDEpnplatuEI3pl7tK/6RKv9duBf9EC4a2ZGVM\r\nNBJs5pLznetZq33jh0idrfDXQYXs8zO5slV5NdZb44whlhzv87qKnLLC9UrS\r\nK/9GKPZsLsBxMvN9XXKNCvQBW8mOO0boKPKAY7vidN1uNyqJK2hOMkca9NCV\r\n7y8jVD0zoYBIl0ZTwUE/lHIow2B0x3UgVxSjmnMtDmsRTFP3GlXDfC53cxjD\r\npIDUtNE+Xfhaz+I2Li9sDlfiz7qwIXaFhWJpulA1BL0cAKNObO/wSqDLjHsa\r\nJ486K92LkyByfqFQGvyCCJVDtZBiWVoSsYMKfJrXOFydB1EnaR34WTA5p/Po\r\nAO/lZML2c2oN26xRJzCEOIUNRhIsQ8zmZTj+ljTp7zVz24ah96Q31Q3n6L/d\r\nPVZGqGJQ0Pwx6ST/uVqwDpugC2saJZsYcGhdAjsuP6szg26WB0cm/pLSw4Ag\r\nSVNtPnCEPWH6yuet0IEC9aHe8/OJYajOffQ=\r\n=YcWP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.1.3_1679913397285_0.3731899703127175"},"_hasShrinkwrap":false},"1.1.4":{"name":"use-sync-v","version":"1.1.4","type":"module","description":"a custom react hook to sync store, with a built in CRUDE","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"gitHead":"3abc19e0084383b4038fdf6204fa8be3fb279812","_id":"use-sync-v@1.1.4","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-V/ZWL/KcYynlIIcrKkiOSn3FSFwpEhnqRxgsqSJbOxiLCnWBmzzuYGLyeeP3gC1OS46sLcbcvmPvNTado+J5Ag==","shasum":"2766aa82671804b0ced33a7be5da165fcc7d382d","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.1.4.tgz","fileCount":3,"unpackedSize":12534,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGRAd/KBgajU24MX4nNvH+5qukub08R49Kmeh+ClrFhbAiEA7Ak8h89WT8tOE5Z4up0QTdNfsyM2TayBdcoGaCnt7AU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIn6YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrApw//bgm818FLnbZLLxSrHyACUY6i8EhEXsUpUIvlRZqWmvqo1FZR\r\nMdJBkkne2I5LrK8rirXPzyB+jLqmqtfRSCFWuVVS2kTMao1iRbR5aLhz1o7b\r\n7ybW16UiijcEfnV0jP+D9GZeBeocUMDbnBIpq4QtF/azZq7js5RvoCPz/K8x\r\nrnAXbyRM1BqRnTEnEGpF/W0vsPvsJjQiNsqV63cDPlxdrpSbjJh3edhh8eH+\r\n08AN98rLa9RTjSiOcjS7M2Y7KBQRERvpcyZ7RmbSnFJUcHnYkHFvoZoB0kAW\r\n/fT/21fbauSV58Kyw8smE6pN6EpN0ro4lgT4YINPtmHQXuRprA4CdNugyTfS\r\n2zp9eZPKdshxDTEP54dRhos8ZvNoCkffXWdgUlVUUK0ofS+P7buUQdipEemh\r\nlAaL7uFYvC1Nb4OQ4bqcp0YI4qJjMioRZX16HiIPE+pbkJZD+D7ZO20GbXd5\r\nXbSaYgQ5iwdDny4gFrcwTmqXDR9z5d6cMnXAWPPKu3xuTJVKJtpJ0kjNx1Tv\r\nqHiogWohE9fLJvgcnLyWA5DN4nEqyN89dB810lcEbzWyjcjDVDtJLdgLqsVu\r\nVVvS7lpvNGROSFuo+9hGD0ApMKFm079oqh/OkSWxq3ArprZzB4EyqpdtcwUY\r\n9QXa3bNFAq2nr29SZu0kHaYoJTtViGe5ci8=\r\n=5nKc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.1.4_1679982232306_0.9412885852426396"},"_hasShrinkwrap":false},"1.1.5":{"name":"use-sync-v","version":"1.1.5","type":"module","description":"a custom react hook to sync store, with a built in CRUD","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"gitHead":"3abc19e0084383b4038fdf6204fa8be3fb279812","_id":"use-sync-v@1.1.5","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-hnD5EUWOoQVPm9rIU/TBnmFXs1Cegs2jicZcAQBEVvVa2ECL4S5a73sd/SK9y8QdmfF+iYXi6Hs5+OwAygzu4Q==","shasum":"c438c1d0a32538dc6d5e024e65e26fa5fd828ae5","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-1.1.5.tgz","fileCount":3,"unpackedSize":12533,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFB4pmQrp+1rc8QvaCr6/XCEOKSg/TP/OoCJPRcjKQnbAiARK7nO6ep7spcBR5J/mTF//S3pwmorXaUEThTpypGq8A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIn6uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoL/RAAmzuOu8+NSCunYrRwxWmD7SE3PUpwZSiC8IXKp1ziE5fMchSM\r\npDEHKWvCZAxRhzsXQ4R7Db9Ci01CHvzwkCe6QWqYHTW+RnM8GqLW47hbRKbH\r\n4Rw9Tcm/ENAOiAj2KbOEQiTPLEeku4u9stXhywt7LdNJxUNsbbzZRxtMBdH4\r\nE99nwWTATDksjQ0bzlz9OzTQSjcJf0pj6MsI6DmnCup7K+Qt4Juq8A6NwiCK\r\nhpL2FhjtP2f8TFYtOVSnfs2PkMcKdL69GCsdfQdcOL+xSb/EOvpGW2ZXiVIn\r\nxi3U/DlMCNnRg93CgwVK8+vreKjsbQif3onBC7nQaKBmieQ1kKqL8hfO/C4b\r\nVq4fx6AqSPuE16itU5m5mgDtJybGsZrUj8jvvXFtJYe9jPSwEKYDP+5WwTRV\r\n4wV5va8/uf5ulttk3gI7BCQ499w8s9VO14VVK6fVAg3WBub3XgEX4UWmsEtR\r\ngSNJQtECBSm9c7lYPfkRKLaV7uonfpSMhzurplzNg7GJf126Y5HUx9TbKFxQ\r\n0DSb46mg6qKRO7iMsEFoHqwFnYc8R/6dmMllSEBYhi9tL9AVP/1pT4xdPimP\r\nfXVywubvOkMMCQYibkx77wbLFvvLV/ni5Fupff1xWWTuL2kZ2dYMN2B23tOX\r\nhTfJhe/4Ww0Z0IOMnyv/dq76M/IPuALyDj4=\r\n=tXun\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_1.1.5_1679982253902_0.17773350832193913"},"_hasShrinkwrap":false},"2.0.0":{"name":"use-sync-v","version":"2.0.0","type":"module","description":"a custom react hook to sync store, with a built in CRUD and async data fetching","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"gitHead":"7aa15dfa52a5d4ab1b74baea7001d11f4b81bb9d","_id":"use-sync-v@2.0.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-YINwuIisgBO0kbOusdXEOecv8d9Jndx86aTXpMkJd3RNIuF3afNjWCwhzNcwKEiA3I4f553fgZdnBA+c7XDF1w==","shasum":"d29e5f2a82548d8065856936244a6ce8bafe72e2","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.0.tgz","fileCount":3,"unpackedSize":15385,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC3UTIRcQKwapXl9/tTFqZFBsHe1N+q4oJvYNjNhYY5zAiAEiMr3xUItGjh5dwrFXpbiKhd0bgWFmyxLCOhpn3BxHg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkI+L0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpV/Q/+Phb+uP1XetbS77tUiMeo+ZJotgi1EQ+wB119fmZPT8k41dpB\r\nsqGVCxmAiA/oeqpz00gfdI+r+PXMA5fkGID/I9WQqMLxUCmfgWW2hZYBGBdi\r\na/EYTfakTW3hG+kBohGOkNHeuN6+rXVg4ezEc994GKsdQ8f85Cwus1cMszf4\r\nl7ugr2474avJZoVGnFNvhMGgNy3k8ELoGQYqv62N2eYO7fdCipOxAGQPCH5o\r\n8pco8uw5xWPmAbwplmt7tyFvm5UFinQs5mr5LCZ7BQ7U3s7El3cWogc2ZvLB\r\nyTirRfsMTmViL8IIVc/vN3VLIwrxEhetjoMp078c9qN9gXTiF3KDNQ6XCkfn\r\nYRen2PMlFSFDxcznxomJZo+W5wvHzPw8ETSEs3zGDpqh5ZRc2uQ6A2r93+YK\r\nDD6zFZYOXGAm5QAuBnX+4I0Q7OkdkrrhSnicrpywZpMc3Bjc52VfMzpybJE1\r\nhxR4X378AKJL2ip3FK7w/DKc9w6G3POA+0EnHKTkfelIqOjoORQ4V19j7Ujp\r\n93SZlZ//XDRoZo+xwfUzELXz5GIpPoISblewYJN8qoNjbvOhbcYv0Eq4KQ4E\r\nBb3FlzR8Af74+RKVM7vxr6bCE5CrPUavkmyiP0yX2fTIs1srrbaeEqYBRaYS\r\nUYXzinRI+vvNQPepTuBeziGQEbF31wfWYIo=\r\n=Z54J\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.0_1680073460114_0.19332026691877302"},"_hasShrinkwrap":false},"2.0.1":{"name":"use-sync-v","version":"2.0.1","type":"module","description":"a custom react hook to sync store, with a built in CRUD and async data fetching","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"gitHead":"ef78cd1a97c5754dec37b3c85f91a1858dac91aa","_id":"use-sync-v@2.0.1","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-+7FyMmM2XOclvjFczbKkmGQ8n1JMLx1Wb8xrf5mNBdPD6HCFTHVjWoi92G5jePzZ4iUNQRShIFx06PjVpZ3aTA==","shasum":"61aa69fb49b7b4b8c09891d2394e9f138e6398b9","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.1.tgz","fileCount":3,"unpackedSize":13862,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCMOJxBt3hFocrq5vm8mw8kKYTdOlQpVk3zjAZGxX7NQIgC8LXM9L6ybQ5bmhCnLU18XUreKZn+EVvd/nuuik6Zc8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJSAnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8vw/+LfAp7SDP+CSNffRJS9waBdVOuuyikLmaQso/i3ZAEMMQKICY\r\nuX2iwIK/e6N/D7h5zMprWmHZ3Ku7HF10jUeARYfJBTOqtw5nkl3QPJsjVsc8\r\nMBecjFm5hqEqCbbl1Su/oBnVGEH518BBEYHgviQRWLQXRQ8TEiE8iegyc3jb\r\n34lOrZ1P7dUxYFw0uWxBGSiZUnzWkSV0ylqbL/X0E5Mnxr+2N6WdIjwat+Fj\r\nWSFEAliqWk5jV0jPnAt3j2EDwg4zBffeGsGfNEJOVy63SK3DJh0kGCkW/jk4\r\nGHSd//GMiFPlh7eF0mwnRY18IOCz0F1VTXNmfk2hQLDZTINUU841LTh690lp\r\nPvxmQZUXvJ0v39cO5nbvbuGKMItBQ5Lsk3mQmczYmFvYOgy1R7KpkUdEC559\r\nGp1UlmGfoFbajDXbDtUFykU+3HMNG/btDJEGS5A0ewimPy8cE2eEbKhCX3Wh\r\nmDUlzNYRY+QyuefIeSHwm22VyJgALFcHMkQyaaQrLtUGsfNj8J/fp8S8EaFE\r\nUv+acYWK74L7Z4DqmxY3frs/+i/W6okA+G8XZBBey6L7+SrOoS9t80duR2m3\r\nOmMonn7tFtQ/6xUOob6P4PbpMmH3FROOCrnIHOtIinUXtpC+e+CcWW5zTVe+\r\nBJiDe7rUrJ48vQvwe8FrC1UY2gMFa2As83w=\r\n=JnFi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.1_1680154663397_0.890269365954268"},"_hasShrinkwrap":false},"2.0.2":{"name":"use-sync-v","version":"2.0.2","type":"module","description":"a custom react hook to sync store, with a built in CRUD and async data fetching","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"gitHead":"c4b107261eb507d4cbdfda65c03a80480f434494","_id":"use-sync-v@2.0.2","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-8ytIt5bASbVe9kVzfLrd/MVD2yRNjL7pIiH1BuJRMtjFPm4rHvM9NW3HjVVP0Z41GQOI/I4CPSAvHBQpO9eZCg==","shasum":"c68a63e3f4ecec52e32a580550fc8ffb8263f9e0","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.2.tgz","fileCount":3,"unpackedSize":15992,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjVcE2fq+Bm5zH6f1DvtJZOaRaaCjjuznSGBGF6bFCagIgANUS4K4EqN8a586c/2hGPuch06wmjOjF+GNWPTrL7y0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQCRPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTUQ//REq6PqWsUcb9tezoAIbC1cbndnCtfeVAPs2cxE0jZE3KIQ+0\r\ntpgf5z9rdRKB3wfxt1PZOrVKdnFUJSB7NhxS6yrCflQddZnQuJRZoD5/a6eO\r\nok8KfP/lDZpBgjq2QNjoe2BIpfuOxVnMldblGehixGWf3PUETnAxrEqOlrUD\r\nNPgAhsYqEYT5cqipimiOpHiWAsIh7r3SdTR7JLiDazYjZbcpHZet86vS1332\r\nypX6uZGV/SUqpPGjZNLo0OP/p3f3jxG3ecfh6tBR5rlavWuFKI5FC+uXuJ7G\r\nkXAxztd+xDXKG9BfYHIr6C2HSpYMZYFnw08eVF844Yg+8TlGSOi4bkVhTwM1\r\nu3s8px9ow2jI2T7v3x4iivqT0La1ncV1hYNggJdnzYlwGdL8UTvpmFzU0GDW\r\nCpa0Y5BfuLrDqxT0t3lM94+LWnzOkgYzO8Oqj/4OI4SW7fUIeaqJZxYu+hmW\r\nwXAEMzIy8MpS0g9p+BTH4zxEk7rOckkVC2Wzw2J5DH3PMt1IAB6ETD+C4dEZ\r\nPJ6vRl/wUzHiZrU/Pp3tR872Kr4Zg2evDiISDLT1I78yhr/QB9u2/9SfTOEK\r\nFkchpbnmwHcvg6w/nwV4mvuHdel0y/xOyo17/JYHPy7sZL1ejEMs/OpNhpc6\r\nVjcdHUhGqLBgU2c4rgSTRjW8cQ6HABee9zI=\r\n=xkFs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.2_1681925199144_0.47014602599677224"},"_hasShrinkwrap":false},"2.0.3":{"name":"use-sync-v","version":"2.0.3","description":"a custom react hook to sync store, with a built in CRUDE","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/recommended":"^1.0.2","@types/lodash":"^4.14.194","@types/react":"^18.0.37","typescript":"^5.0.4"},"dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"scripts":{"dev":"npx tsc --watch"},"gitHead":"f076977cc10509ade790fcfe3aaabb42a527370e","_id":"use-sync-v@2.0.3","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-Tg1oLWtouDoNU9Aq940401qQpw+RkWNIrzycQ2PYtkZjJJ5k2I0Kr2lndcy4ClM8sN1wn/b90zC51gMCr5lSMw==","shasum":"9bfe2573b59dad1e214e44e275ff8a9348f362e0","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.3.tgz","fileCount":28,"unpackedSize":217894,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzkj0lI8qQ3dO81a2YfFOf1aLDE4ro/IdS++s1AiVNtQIgWObkpsef2pV+F+jgLq0eCBUXUPEXWV+1s3oYByGxLmo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQOPFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+eg/+PcjAW62LQF/bFOobInFVsXEyNF6PNEyWMTDCKIB7n87ZjHoC\r\nholIK+q4fVVT4zbXmGhQFJtFXTDlJ08DioeuLSc26iB32AK3LdbxkjIJJmuJ\r\nXKR5BidQzZnTugMd1McwDcXb+7ztITEqUGh7YQIMWyAFWQpwcB+KsHpfnd8c\r\nUR00Z6PbZLK/CP7zzHTHeKdrOKTtI3FGOMpWnTrLcTmpdHDm3Xq8snuL5/fH\r\nyHcSZbbLTTV6ixJd798INd4XDIAerlpYDt8BbUiutezUyjYCQxGX4GLHbAly\r\nJ6uZ0tYF9C91Q/OObKUmVqCLYuVeD+mGZJ1/bZ5NiHTI/+WhnnEva2S03HTP\r\npjfJOq6lup8bxyptbzLQfnVm6cO4ZfgE8jX6IWqR9VSCsAukxHc4+zjH/SEb\r\nwZWI/Oq1/rWW/E2pD477jx+dCH++JVlitILOjMx/EfEEBDeKNU0bSWwqLuiV\r\nSdUzQesq6nGO/DkXBnDDEyItjtHSWPbjVzFs0urOWyQRb9FyOUUlj+5TsnL3\r\nuC8gV6xddxcuuHWkFYq5U1UqfcrJ40R0K2dEdLvBxyeuDBHTs9/ZRlrsoCt8\r\nnEzWgvmIVmQBMm6TD3PFfQ2UkLopwF/CEltBlE1N6fU0bHlm8+rNaK+x/5xd\r\nqQ03JH2P73mJbcZrwPmCoP3AvIjPsJo0j+U=\r\n=YTc4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.3_1681974213317_0.404636512091171"},"_hasShrinkwrap":false},"2.0.4":{"name":"use-sync-v","version":"2.0.4","description":"a custom react hook to sync store, with a built in CRUDE","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/recommended":"^1.0.2","@types/lodash":"^4.14.194","@types/react":"^18.0.37","typescript":"^5.0.4"},"dependencies":{"lodash":"^4.17.21","react":"^18.2.0"},"scripts":{"dev":"npx tsc --watch"},"gitHead":"2babc94311109d659a76293f6486c9b72b0f7c37","_id":"use-sync-v@2.0.4","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-B2r4kG7tCRAW57F/KdbWJ5xVCZojQJYLWaosB3x2w6joWARZQtD6Bzwvoht3sfK3JdKb3F0EPzCnynHL6R8zQw==","shasum":"c0b3aac98ab4da8cbfb8bf09ec5e458fc42df5fa","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.4.tgz","fileCount":28,"unpackedSize":224594,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmnDBPO6/UT4hHX5Hy5YMSg12VGN3ocvyGlaP6y3OejgIhALv1DjvlO3Hv2iJiXcfsicFemRBJnbPyrDu+SHhk8WBW"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQOp+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqn3A//XYLjfY7WqK8jE33T8at4kKm5bsSmFXv+wG8MxMc05YpfaS70\r\nXc+13/EoTB6BMTm1QNFV6kif9nhy1BGBr6hdkqRhqR+cfa8SoxUsqIqWONWY\r\nJQ7bPKBfuBhyJEg5Hh0igJshEYRN3RSi67Yk5OsUyGONkjBMWHo1nlgQavBr\r\nfoRvSx/x+z9hjpNv3zrMtpy6b2wR6KlhhHpZx8CLNNfetb/xDus4whMfrG7o\r\nl2IFA4LeW7UzqgWV5hZIFO6EaJ0Wt/fWIDRJpuh869966tvk51PvWqeiT3RD\r\nIsmndKqMs44W3j79JoRM6HaX6dwmD4EuSh6a8k/wBrIf2JNVy+yLQp3nXpPF\r\n0xZ5zEbqLtl72QK8gC7p+ALwuY5ClAY7rz8xuTVwHBXgErw2dSDy1IxRdESX\r\ngjzzeRZd+q4u91lz0W53x6ItLZUGfE23MNUYgnU1dlODkWwiAp+sSIvR/5zn\r\nHkUPuHaAIMRht3BhZV2i04Lyiqf+W42rbQYyriedimwJVW0m5n0Tj8OQc4CP\r\n+fKyT6PmmfYjbM/2451dJw6I6YduN8n2O1Uw2vTcfC+TI3lT12BNtAFMYQbP\r\n0LXggCGJNv+FF6dg4aPptd0Ip2VzWHDG9sZie2vsmnEhpiRRRsQ+TFAynKFe\r\nZD6RA4LRNS7lRs8qIrdJrnh1/IMFhibUcYE=\r\n=7zwd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.4_1681975934690_0.05219696285201114"},"_hasShrinkwrap":false},"2.0.5":{"name":"use-sync-v","version":"2.0.5","description":"a custom react hook to sync store, with a built in CRUDE","module":"dist/index.js","type":"module","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","eslint":"^8.38.0","prettier":"^2.8.7","typescript":"^5.0.4"},"dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"dev":"npx tsc -p tsconfig.json --watch"},"gitHead":"d86b92b6184be30eae5f085da68030e892ec62a2","_id":"use-sync-v@2.0.5","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-iE5EbiRZxN55llBnYn1HE7n8yBwRe8pdDf680U2CJp9dlz3CJi/3owZpIPgN34FFi88e8F0UrNoEVtKAVhgaew==","shasum":"2fb5d9732b54408c783da996f5528430cfaf82da","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.5.tgz","fileCount":54,"unpackedSize":231095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEi5SugRylSYSesWTjobsBQjfSD7uJ6i6dwhHYwBdRgyAiEA0Qs1ZpkP7SbE+hvjjcicZ/wwIsT4gxSlzftbKHv8tgo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQRoFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGgA/+Opab3qLpLFrAhJM+yT99MLrgRAto8XI7UmqzG0+wamK5ypPC\r\nSMFlynZ6tpoGnLfpLPZ9iMCNb9sdt3slHEfxhboPbKXDtXJ8vKMrvJnXl7t2\r\nyeDBZqkBzXGIZws4OTwgq1Jp1qxHANAdfmYqqAM3FBAJtgNcrTLMfYi2zPIn\r\nCGQ2ZIsMyfObz5getaNb731Yln7Gu7j6299cz4AimEnIgJA2nLnqeeFp9paI\r\nXCmRywNWR835iOfpC5S9GfSQKQW3LV3qzVDGTqjfBNwsatv0DORk/ff/62bH\r\nBQuygSAOED+QqQYAljOh9n0OrSN2VG0H6I7bzV/TdOQMCuMy+Z9Q3oEcMFPk\r\nb9BP/t37hE9uNpbGzRL2GP9siC9vQu7ewT+ysOqmu7UHBrWoenETpbp1cBm1\r\nMhhj8NEpD9VMBm2EjHdI+SYlBWLxQFJcnLtRP9eE1IbSmiT0qcyuJo79cbKO\r\n/+hLiMXtCodHG0J4IMwiyTyajDiN0DNJnwrUkVWHlVvKriPxXXo+VUjdbRZT\r\nehmMHakk4ihgbnfzYQwsu3VSXDSvWYcPetYig7beVO5T+1d4VZgW3rmhrKBA\r\nfkbCTi270dBPLu1Dtw+oWg80117LE7tv8m02ZjvnmwzJA5Q3G/b88qwZxK00\r\n6HYA5DqAb0/xw30o+hkIGgVDmxjRq1GXCYI=\r\n=rGgv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.5_1681988101597_0.7431096333227578"},"_hasShrinkwrap":false},"2.0.6":{"name":"use-sync-v","version":"2.0.6","description":"a custom react hook to sync store, with a built in CRUDE","module":"dist/index.js","type":"module","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","eslint":"^8.38.0","prettier":"^2.8.7","typescript":"^5.0.4"},"dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"dev":"npx tsc -p tsconfig.json --watch"},"gitHead":"8a1c05f6fe77ecc0895222650cf2b35c33a07b37","_id":"use-sync-v@2.0.6","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-CJnx1AMrhNJHkuf1CBR/QfW0G14pEcX/NZE1oPibFuZ+AkNa/3ZX+QCkoRyAO9xD+B2jaNJJpGQZgtpTH4SlYA==","shasum":"3241d07c432d289bb6fcd40d130f7fcba841dff5","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.6.tgz","fileCount":23,"unpackedSize":28896,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB87Z4AqSqRmRqruRb98Y9rjdi+f4fI6sF0IJYIdVP+WAiEApXpDnTXhX9giVtcHBgKyG1fW1DmiIuTM5iMm0oBoY9I="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQT3FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpytw//R6z2c+dYRpbbgKTYBqJOqXVS0+hPXgk8hK1uEYS0zjhfidda\r\nkvln4r43A3Fq+05ERrQkCXc6rbipix2fIE5hL+Nc8ryy0HHoCIGmI4vEar17\r\n68LwYPLZ55o/7RlrOHivAXsECSvQ9FV/35dGesacrZ5fxPomiep1sB+0c5QI\r\ndXLyPLHXvbPBvHuMoD9oS0gLX4rV7EWqa8Od6d08vG/z0nPchu+FaC2QUyaf\r\n9kvr59KuyDmBAmVE3ljex+MpnQIidx+08InG7SqxY023NWVq7m9L8QZx94mx\r\noJypeqJs8OChkHB6HrqnGt7Qv8na7NMsbYAXRCelli6Ydxg4SOgjl0b9pdNz\r\ndwDF+OwtwWJH1m2mjk5pmouqMNPw0VxQclj5MmMDSKUI3XpP2GIJPC3KXxix\r\nHSYQ2eS38I5CjmR2meF825mq4GlvKN1mpzkqUFITqck42y7dFYLSTedDTFDy\r\nzsUg24xLAQi6VmzVo9yJW+ejp+8y718CUgGUQApJshyRPPs7in3lZDMbi+0I\r\n/EplyLRbuN4gneq5ykrtrmVGn7tRx1rjRWPuAxBuC8v0zsAchXxYKW6LMqBw\r\nw3/WpemxtA3MN3QxquG9n8nyuNIgiG4lODy+gTrltIdipprThS1xsuKEpQ1D\r\nJdEuGw7ikvcPY1r6jZQl/61xyuRNWs2jlTE=\r\n=fJyr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.6_1681997253677_0.34181104919753036"},"_hasShrinkwrap":false},"2.0.7":{"name":"use-sync-v","version":"2.0.7","description":"a custom react hook to sync store, with a built in CRUD","exports":"./dist/index.js","type":"module","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","eslint":"^8.38.0","prettier":"^2.8.7","typescript":"^5.0.4"},"dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"dev":"npx tsc -p tsconfig.json --watch"},"gitHead":"20da1a5071d8d0ad5fd29c3eda4382560172159b","_id":"use-sync-v@2.0.7","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-+6XVqhQhS2zYOhnVkI5Ag/XL18Vou+aDyJ8BYQxHSxWXr8gjM/eQLSimxjCYofM5dGU6IlmVrpzZcmPx7PblXg==","shasum":"996a6cd50765f8d1c872b490b821dc1047014b05","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.7.tgz","fileCount":23,"unpackedSize":26044,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF+5PVNollQ44Urht50r+nUaL2oVFlvCCE1hQaywczfhAiEAwHKVQ5xlGsY+fAbhGMf3n1iTogM9cb+uFvXya41T+vk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQV2nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpT8Q//TwQy65lVrcvMHpVFiIjH9ESOADnpgXHwwN7pbSqhfRJvtHeh\r\n9MLGHcYLHFVWPMGVZ1V/sohInewlErCIeGl6gtjyQwfqObPIHBZE0KdH16Jd\r\nW7P7+VMygxlvXrg0IOXs5KC6Eh8yBJSasc09iR8ryepfFZqYwpPXfODwFxuD\r\nho8YpMmDxWSaOyupIpKwm5dgnUb2J8DAiMXsxypuYKtxDECQS+lARs8Yv+FB\r\nHLmfz1tzH/E9qPHfdsIU5EFKZWk+RR2dRAcgMeZmstUCvsIHdJfI3apmUVwY\r\n3NHmZBxc00IOutOt9vNeGoW6SPc71/HhuZd1WkTTfYH4giJ9IJN2oSa5UFSj\r\nvTb9yVF6ZxIB/GDKbBWxrNcEYNzk6GD09HguDGUIEA39IOR4njE5icPAoJeG\r\n9l0VA7QDXuZpnU2k47T69IjTdHl+utpcmfBle2RxYr6co+x9KeYdhQyLtrjd\r\no4aDl/G3PjEE4VMK277N5mPSQ4Sky1qAU4Iu/J6w9AW9DWKBDxlpiHs8Ahjw\r\nHcKliTxsbIIRA+XybM16wiNiT8Bw1sU7sXeDZH3dZsdkb6+Tp1wBD6go2IQ8\r\nghOASQmyHHvJH92zZtXOJsJDQC8Ys0zRwNs7XqebIs2cBRtWOpdecM6oHbJ7\r\nnIPe03sLxYxOpeIXmxe95CzXE1TXKtnzZD8=\r\n=XcOp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.7_1682005415707_0.7506698575628572"},"_hasShrinkwrap":false},"2.0.8":{"name":"use-sync-v","version":"2.0.8","description":"a custom react hook to sync store, with a built in CRUD","module":"./dist/index.js","type":"module","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","eslint":"^8.38.0","prettier":"^2.8.7","typescript":"^5.0.4"},"dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"dev":"npx tsc -p tsconfig.json --watch"},"gitHead":"f013ecbd307124b64b7698f44862514cfbcb3197","_id":"use-sync-v@2.0.8","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-Pb/EHH3oZuEni+8PF8Pm/csRJSXJWVIKiMH8QRLLBRC82r+DFQfP7QrdjBSQwYo0LRqsadulQVdZ7ZNtshiYMA==","shasum":"712f4524a487ba87537d5e9ef59bca4e25763efe","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.8.tgz","fileCount":23,"unpackedSize":26043,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgA8K3GZeVITTMEl31qZ/a5bRO1YR+JIuBMjsG0Ptk6wIhAOa6jFewGSLtVKfjzhcO81p+Or4KSsElN/1L199XHLPB"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQWSnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+sw//dvf4bPi315Xk5XdlUyoY6XyhbKBx6NK7yOBMjAWLLqS6wORH\r\nSvRxBawivdcPoVjGAUfg8UZUe/C5Z9JIsm+dlijOWdvIdbuF5fRBRAd8RdAC\r\nfHwU+QKS00+4D8C3+K6OfxY0BWedDKwIEOdoICCZckCOm7rOvuivd9iEeomz\r\nEcHP/NGehCJxwf9au5WVf5BtWx3MrHm6GgiJKlH6X11enCZaqlpbzDIyoZYP\r\nwjVszc4D/wnlkfx2cEny3TKZf1J6d3gS5xdhnxmptErg9TzkD2v9TiftGx4x\r\nXJSnbJjpH0OrjvqJw/f11/QOLCP7XgTAipl8oc8Z4MW7SsI1jbksRRximKj+\r\nvb3UYq5QnTVpin4tN3kbVLanqc8DD4ucZZpyaWCU1JNGNPypdGQhyp75y3pY\r\nWGo7jvKvvlFkcpN29Hj0mD90E05/oK97pI6ctMeTdFfVJnOf2hQRuNP+6Zax\r\n+lo1Sp09vMEsVJZ3lmziexh9xPgZVD15f3cuIrPz2wCV4mdp403E4/kqNgVI\r\nTPFs14L3OLsxyVeCyv4tPI+HjjZwjPtdKm4BKLm8eA8UB5sqLOL3zCSidl3K\r\nXSY2YJad2MrmsCSayvbw6Ee6kLO/MtGbKHkakz+xbR6kyuWeStuCwRce3iPI\r\nLYlOtRmXpfLeBA3lbM4zEnkv17y9EcYWklE=\r\n=CO0r\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.8_1682007207805_0.10554957057576742"},"_hasShrinkwrap":false},"2.0.9":{"name":"use-sync-v","version":"2.0.9","description":"a custom react hook to sync store, with a built in CRUD","exports":"./dist/index.js","type":"module","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","eslint":"^8.38.0","prettier":"^2.8.7","typescript":"^5.0.4"},"dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"dev":"npx tsc -p tsconfig.json --watch"},"gitHead":"926f16918257134896fb5cbf477841a7ecfc8bfb","_id":"use-sync-v@2.0.9","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-v7lwgvPcrybqVoTh1klOHRN+OI1YV7CU0qFeqrnwHQ3riVh/gEA3auJg/E0+K8TKcEt0hkToZtnwutXoAx4gkA==","shasum":"13289a5e84b9fd28d1d5d301d3cbfb0253aa762b","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.9.tgz","fileCount":23,"unpackedSize":26131,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGd3583ToTCF3/AqqXRbBo2bJ6ECNFd5/kDGRW7h0+krAiEApsPKzqmMf+iA/uammw5xDF9a6V/tw37MXLZTiRoAeTA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQWvqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoL5xAAkaOgkVSXhK8ns7eZWCKZZ6USz650eZGTWfEjUsvpD7rR/G96\r\nRDm+3yfrr1Sg1mj8xU1S/5OinDPlH2BRm1ritAIdXWfJjApBMaazj/+fJTr7\r\nDVbc3LqPcyyS8EvJY21e+pCsfdB9Y8n3tACQ8U4qFKhbtmShoHeIaJc2wUbi\r\nzQJ53Ut8dISkuDjZ1iQBDNATg02iRI9ND7kMLKVnEUFueNfzYdBUoOiZSMiF\r\ngJWk5gRWFii57ErjyazFwY2VEryOA1XPFpqLx+7bc+SlzGRSeBTY6zDgIuLB\r\n5s+TtnLQnM6qjEV+ixMhcXBJ6fPOk/A/bbEcZYZsoCwd1ASMQwzuOzRhyl8/\r\nHJH4g640hCaaqWIftWYoB0DGeb68ZvtRh4URXlgCxCPiqLBWNO17v2+TDQL5\r\nSw9Mn5GdWba8jKPkYeovHB9ClSXAIMzggVgckPKmwuzu0zdNFm5vEVAr8oyP\r\nLZzFfsxnahTDP8iCIzGlNoObYVVj/ulPQi1bhfmQ20R7DI7G5kmJjg9soPQE\r\nT20NS3bF7MsEQPqse4w4JXRxdZevQ3H8bq6Xx7/kp8/cMbn6HQAM2DC0EkH4\r\nrqRSrGad6MQBc9GrtokYiC03C5smPqvesxQDtBOTc6bHxc2EyJwR40hCzwPJ\r\nqZwOYKgvRk0DKSDIlUribQAyHCy57DogOxw=\r\n=2YlL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.9_1682009066330_0.029171759040094614"},"_hasShrinkwrap":false},"2.0.10":{"name":"use-sync-v","version":"2.0.10","description":"a custom react hook to sync store, with a built in CRUD","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","eslint":"^8.38.0","prettier":"^2.8.7","typescript":"^5.0.4"},"dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"dev":"npx tsc -p tsconfig.json --watch"},"gitHead":"72b680b1753f274e72f56a873ad037a2b378114e","_id":"use-sync-v@2.0.10","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-Jwm/V/vuRDSWDJz6N0JdnOdTnHkd3Hg5Hz8VWsnoh2l+sIlukCSTZrLWKcFsIeGxmMbwuiTxPgmfiT2L/za7jA==","shasum":"9ed2c350df0a1002f59e3691299b6e8bfd380fd5","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.10.tgz","fileCount":23,"unpackedSize":25807,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCusxcfDEq03UNALgXm/h7ctr15N0TDyJ0KWI3sslV1cQIgdWFhZzv9ktDH9jn9d5+64fjtRWvlxufj8Kd0yWuMqrs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQnmAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrh8w//XpsRfCPRWHxD8ctz4azT4YY99H0L9HIHp3iHGOkMJeHBw+/X\r\nZEWB8noAJMXu/v50WNvz50liPR4nXtRcv0pk/w/duny9MJA5SYYqYPHagDMU\r\nOHSO6Bf891U5tHFUjrcLAYUh/dM9zVelbLr0akPgSYwsXkBOdSmlJUm1eriu\r\nIayQfYwmvQ/yUm3Vmhxh9AagDyzreotfGgsv7WyPWQ07/eWn8RfMfHFb0Irg\r\naVJMs2vjbM7bjgbL87hQQK+VaDlndkDQMWv81rIph6FrtPRlJcEBCf86pTkF\r\nJqxKKdlWruOKLFTB69ycWsAx+Qkr7as6p3ZMb24AfMjXqnAE5toRdN0e7juj\r\nf+On7pAAIAs7usGBbH16ETIPza7GNNQOob5RgzuPXh78yXflZPZ3DnHO6TqZ\r\ndftP9DKY8NiRM4FNXSgcIbJo4L/4j1qtxXfrdVTgSGk/BMiacT0RWoRA8ynt\r\nNBX3K34F4PbPtwR48aj67rxHv9T8DKoVLgZv6M3YRMKa3p7bvTjvq08rm+AL\r\nGxp9vqhPhmR1NS4b6Svy/ScoEOwiHDOcqo4pHW8uHOO24CJxyfrbP9ODgjik\r\nWNG12YoWQTiw2/y6OVZx/IRNvVXZxkUBl1d8Lg5Kfvi9M7MJo/lW0A+v3FeI\r\nHw0Vc/LrMM2ZtmvL49RFqemrBPlrlv3O65E=\r\n=RloE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.10_1682078080611_0.5739323249695947"},"_hasShrinkwrap":false},"2.0.12":{"name":"use-sync-v","version":"2.0.12","description":"a custom react hook to sync store, with a built in CRUD","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","eslint":"^8.38.0","prettier":"^2.8.7","typescript":"^5.0.4"},"dependencies":{"lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"dev":"npx tsc -p tsconfig.json --watch"},"gitHead":"cae2aa085d626bfd745f93594ba80029a7de79e9","_id":"use-sync-v@2.0.12","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-IEjaq82rLscJNSWeF2nQaV+BjoREHceuOeX3WiFMHfpQN7wYj2otJD0luEJcSxNuK87uPea5YGvh6cJ0HJt0wA==","shasum":"7af128fca7c263b3ee9d58292d5e71d3da56378d","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.12.tgz","fileCount":23,"unpackedSize":24938,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGYVCypipltQ+Qu0dr6U/g1JYn8/0jDulRG8KMfb5tW5AiBTF2REflRbZNx4b8c7I/ZawLTVrk2CInrI56chHwqwfw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQ5XWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpjxg/8CFrfqkJj1+UaaBKefrDvco5VBlRXeDIH+4ayW/OSPv9t/TQH\r\nPNAM6WU3W8inhun6uPkrKNtN2KUdvzogMhGn0edzpAZFOvwhPvO/5fW+NC1e\r\n8NWNjHUS12mhiowjX87SFLrmjR+Hg69kAG7kU8m9/nkvyMMe1FK8NTyPQKmE\r\nKPN3jBvF7XARxh1jvRpKIjOgdagAF4KxlsRWWh5lDKKIzBvILgEqOdATBv80\r\nNurq2ddr3ho1nJ93UofH62rUz77QdTbr8zJsDTpeH9Ar9YzCtnpvpINJjvbZ\r\nmTatFIRgvZDQUvls5flCia9wywN89VPuO8JWZokiL6A73UeoVfthv+qunBCI\r\nKnetStUTNJMFPwbrk8Qq2dbjyr/G/rRPgBE6+DYr7RLOkYK6DgHUTChjGnXa\r\nT1l0zeZyxqe5QSHbn+r06ECjqnOWcPsuHTh6I/QIVrwM4xwWbcK+VZZwYcI0\r\n9RPRTEJVbktvd+oMD4kAs3tu5Wdj6LEFWQ0dLO0uwb7vjHs0d34HQTHnVioR\r\nCyEPKtv+B1eBl0JHxIA7NFDgJ9k24sDswuMXeYuIwWmzH/4jLkUb6kQiifiO\r\nTOpVMtbLW/3fLWVIQrG16AHU+zxhgpM9vv20N+VTPwsHFjGP1fHTsHiiRJ9M\r\n/wXsbwbuMybbAaaxIernE7zA+J54hTdeoSE=\r\n=RWjU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.12_1682150870378_0.004470105900914456"},"_hasShrinkwrap":false},"2.0.13":{"name":"use-sync-v","version":"2.0.13","description":"a custom react hook to sync store, with a built in CRUD","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","eslint":"^8.38.0","prettier":"^2.8.7","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch --entryPointStrategy expand ./src","dev":"npm run tsc & npm run typedoc & npm run test","test":"cd test && npm install && npm link .. && npm run dev"},"gitHead":"54a0ffec0a0a7a7fa2a3798052b2c120b14a3f91","_id":"use-sync-v@2.0.13","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-T26UbOUR7dmZ5oFPWiBZ7I363yMI9EkI8JP7y/LkjBullXpDzNd1HKF8XOimPJds0WOL9kiOjjozkj8SAP0o8w==","shasum":"40d7dc5f6a3e9524dc4118966245a12d345c844b","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.13.tgz","fileCount":23,"unpackedSize":27439,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1/IAKpWpvEmbKRQ0PWsWYVKKtlp04R6AX1UNocHftnwIhAM3hxQNrCuDRzjO9apcVo0ism13GutNcvdsOAz6Zz+qU"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkRsiUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQaQ//XhrIe5kdDYhf4WCWhyP15CD+QLVh8ycwtyjaPfReXiK06OKQ\r\nJo1P9UNUTQkydNPPzZ4nGZpt0ceXFXfyLTRunNu659I8fXHQ+TX86bHeAn3s\r\nMTPLhxCtFODLs3hPwLcnmXdMVEDKEgXi8XAY8A6+h0FAVQ5+TvaitD8HiJ7Z\r\n5mhxp6IAOvocIq/CL927ddkTS8swBPqw0sDE2VXTfD8eG8UqBDBElACxg6Iq\r\n81cv3OiWgfur6sd7n4Y4JzeokWk+962rSWk1E+C4E0GNgVPVRPvJq+96ZPfo\r\nAiGjQ8Ol3kz2wu4/ht7AzAjlqE4bUGYc5f3mbJ1ssqJAivtmELifgUq5Xs06\r\nqaNvhDidk6IAgUHAvsyRLJ8cPJrnWic9y7WolQHgNjAdNBWRa//H7ZEmxYUC\r\nz7H6lB/vBdihyIZtiSQkdBjgg8oP12YCaioFlRMf93/8JBkUrShcwQJ05N8k\r\nWOSuCQiE1oGNvEFb75n3a0/kt4XlsTSZ/jGCGzrl8K5UGlmWLsEnlwZ8LPqJ\r\ng5SMmktvsA+MwDHaWYZOVy+uuLTkiqAeHQ6eLQyY6jwlrs9Vaez/zLTgK4OS\r\nae6OV8mxwWBMDJCeY+gbQZ8n9ydMayi9u2ai/DAVQKRPeemBz09ru1Nn9fbz\r\n28z7gyx1F23dg9FFPYAcnNmKmpoTEc8jC3A=\r\n=IhAK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.13_1682360468622_0.1777661732117286"},"_hasShrinkwrap":false},"2.0.14":{"name":"use-sync-v","version":"2.0.14","description":"a custom react hook to sync store, with a built in CRUD","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test & npm run prettier-watch","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"41c392dc5d7d0abc5a4f6c4ee1bb18e8a035ea42","_id":"use-sync-v@2.0.14","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-LauJf2frp/aZSwoSR0C7OnZCh48BSVD8Eg8NtwTS1PEWQygK0T7j8tQ5yGRMmouFRzfKmWzLlb/2Cgc7b5yJiw==","shasum":"9a4120966668dd3ccdbf04987b9df91367ebe5a5","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.14.tgz","fileCount":23,"unpackedSize":27933,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEK2BgcspnDuAP9TYUozP9HlOqzB/TnXyJDG/9Ic3uQlAiEA2H/GO2sEa6acOE4RX1FsrUuQJ/6XxRUve8LkQI7ClG8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR4CmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWJQ/+LZdn7ljwA4/IR7XFXu88P6CbnprG/X4+rFRCmbmcUqB7tcAh\r\n0c76oFg8a6+1z2MZ94jxFVte8Z3rBYGLAtPoCjd6YliNrePj0d4p9x4e86nX\r\n1N8b2UnX1hWzWEcM5jIh4UdDsLRIGeq9wh1wKNJ1mwvyWm530FWmEXCV4STv\r\nr+xC3IU661MILnDzrej5vAgzIfa9biaK8sioEPeCFVWnahiBvbGSHi/1aibz\r\niiHgDGmXVBV3FrEiYrVrCNM8xfTtDpW8+oxOZQKF+NlmuctkvDvuTzeMxvij\r\nrAEC707vB7LRfKWaQtQ4Z4ixndCvYAh3zLfeXn6DDq2lfkJOlmj4foVxksb3\r\nKAnJfHSNMm/mYdKwjTxS330Wb9OUrQlBFmbo/zKbq9uO82ug5yGav+vh52n9\r\n+Vf28OCvpt8j30WziyjxILUAreip8X++DgzXx1RrzeF2LbLprqhnID/ZwMp6\r\ntVfQWF6fEw9fSyENa5oVaJXIjFlcAHKyfCNtppHOLNkGzG35wp6O8gdav0J4\r\nbKDtgk/eGbcOrHOOJysyAqzz/tEIrNXaWeEDeufGiXKeoZuVZkhrG1LvS+Eh\r\nkup9HOeyVE+uyCqgrQvSWXOElOs4Q8hkzMxrjOtKZQu9dfISm975SCYRWbil\r\nrRbgQPQueOnbLA4Tg6EzH4/N12rvtTK1uUg=\r\n=Fgys\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.14_1682407590589_0.7795172411954607"},"_hasShrinkwrap":false},"2.0.15":{"name":"use-sync-v","version":"2.0.15","description":"a custom react hook to sync store, with a built in CRUD","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test & npm run prettier-watch","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"069ca3f87610d5a6f9fa88988b6ad1c69d55836f","_id":"use-sync-v@2.0.15","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-UHBjhGlGpI0rB8Vfv8vCi0Hsgu1asMtdOBRhyp1z+MLZUIFZERalgMI524RgSBwArbrYBfD/IhG29OVGcfVliQ==","shasum":"df5044ae218b6e72b548a2b84b69518d49b22a87","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.15.tgz","fileCount":23,"unpackedSize":27933,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE5bMwf9oU5GB9XrudHuN3ZztqaLA9BhZBdKA1sKmKtwIhANBC5mYohwtoJFenyqZ73TpbBm4gx5fCqcEA8S8rQfg/"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR4G9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4XQ//eXo+JV3v/JbWbIN3wOnBkPqapb87uYB33/nDAt401rRtp4jz\r\nbTCwdqxRLU5yU+sexe4ynkY1VjrFoWeD7VLGGwsxcdU0+9j8Q8WsGc9/HrKX\r\n48nrqer6lzM7dXMmd2Livg6rQMMMbB5gi/Z+CjUfXliwM557wVw3cNx+zwqG\r\nBYk4o9pXR+EplGfbnfibAHX2om6IaquKjs+nJPG4h3HwSVkfoAawzuGvqkli\r\nak02IkBZSCh4GOtmD+hZkLo7FgIAL2hngVyXEtZhLt7sDnvnu0ahwcbfCwBH\r\n/kR/Ormt8tNFGCz2Lc8l3+V/qZQH193YNDkU9gp3QWQpxuUTqcDtkJgFFKSZ\r\n9dn9u1nXNc/NvvHaeTVNEs4qUwGhWhV10myHtGTDRk+3hUE4X/BCJlQrxeZO\r\nLoBnlm9/zpT/Z/gI/LPxe31TdOBoBUnMduKWAEsCmYLc8mnOVGAKpM5cGJR/\r\nQteKEWxDawavYiWkD2OgpafWq+emDZdUu+rt2tQYeq6gKD25sn9MpqA/eeNW\r\nX8qFFP/c09CwkA93ItNvWWMhGv3zMWI5FPb/Zn5SJv1NuwpTQb1GhrCNldP9\r\n8V5j0w9vkXq7S69SR+jfrbBsTJV4mNGyqsKA5E4wx2hNUn8dn0/iE9VQ2ueU\r\nFu1PUHOLbR/y+GS5FGJvaO3gRtbLGhnxHMo=\r\n=tK52\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.15_1682407869323_0.7405102143212963"},"_hasShrinkwrap":false},"2.0.16":{"name":"use-sync-v","version":"2.0.16","description":"a custom react hook to sync store, with a built in CRUD","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test & npm run prettier-watch","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"0b8fd3c2c04f133782260a40c5c464eda83d4e0a","_id":"use-sync-v@2.0.16","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-3+NMa+wFHbcvxB2pS2Ps0muSiBEoyCfg50iVET7PXJ4kw3bMzxtLEjs9DtVxkJnAEID3VDIGEPz5KBZM6oSgjg==","shasum":"4dd59bfd99ac45cb782fcc5fa5a208345ced86e3","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.16.tgz","fileCount":23,"unpackedSize":27933,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICnrc4H0CSi5Ec+PQySPgcKXZSLCAQQdSDO1uxQGTXVPAiEA8XGzKqt5Hr8vsmDrcj1keRDOWv3MCnbvVcRaWpYVOfI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR4SoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDFQ//RbV/cBFCbeHxgZfo9+lqOYmA0ZcKw/qUwjCfHrlyfrLxBuSu\r\nM4xKZSa+SB7pdky1KrtHofdxAUCqCq8Itu5RIeAPMRCvU1Am+NRQyBGAMOwj\r\nsdPVopfBZBZYWcXJfW0BwST0obKYqHS6vigXwnlpJGORvvXlHHpSOsFFhXrq\r\nlDXAMR2FP7zb7Xq0PikrfuhCJLjVlHqzyB2gUXgI7yqnmaGhR6Gp1BazhRk/\r\nieXjIzchUiplzeMIbgcMxDJSm0SH8MrSFJX2oaWnSJvkP1onAUVfo96M4xCO\r\nHktCNxGcQNd+sCnI+Kf47pGxAGZw+WNZj13teXNkwtpcjKH2q+/Jz+HK7NrF\r\n8/FCfDKP0uhSwu+HFB3UGIxvT4494md63A3Jouij7RS8XF0KNK5+xGIQicF6\r\nof1zw6QDjFDR7vDqmo4TXpnq+PSP7clUoDSd2zeMJPIkHGwUdntrcOvLBXKi\r\ndMx3ZLxP2PBBX9fmWjQq3plVXQfxQYisbDyYBpaaVDkEtmejZkSuJV8VqKHf\r\n5j2ckhIw1xGmZx5+D0yqr7oCNmrmDwDf8VvBdxbgrEV8xtpkchl4xJwC3/Xs\r\naRQZXJQ66OfJRbzNl8AQX4uRLnPishU07EQcdV3n4djWolMO+0zBQZXOixCJ\r\n6pDipky0this2pfJxLcOBCoL0qlfwB9mJz4=\r\n=+sDg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.16_1682408616125_0.683856471687109"},"_hasShrinkwrap":false},"2.0.17":{"name":"use-sync-v","version":"2.0.17","description":"a custom react hook to sync store, with a built in CRUD","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test & npm run prettier-watch","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"70fe3010a80b010f79cec585ac06c0bccf5d4f82","_id":"use-sync-v@2.0.17","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-9rlFRuZAZlsa0gpC/yhphihjfZAz1C54yCi3Ra03OzlW04a4swAZLiUUeWRuOB0moFVtx5dntyqumuwfBm3HTw==","shasum":"25b796b503be65ff75a80bf40e1baa084f093564","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.17.tgz","fileCount":23,"unpackedSize":22472,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGYzpo9HR74i+ZGcND1xLqzChBax+CfCWVDbgVo7AqjMAiEA3TlI3WmzXsINoRTDAm1rLypRv74MHlT7o96afEFy8Ms="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR8tvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpqUg/8Cw4SXwv3OdeH6Xd6VIP/GObJ38dhE/UsAWWdCsGyk3VockB2\r\nUXRMFivX7QRvgNxwAWfVxhPwIPZaVTqWEkhCeAdEy1M6P2u2O5aNCYtGcgbg\r\ns2fcmh5hIx//Fy9uj4bTeCRunVhA2VuUZdkXwrBk+D0qT5sUQwGZ3cep1C24\r\nPOj2yQUbN96U0vn9pTvTPxEbDipatoG/qh6oNYDeN5VhTQKELS8SyU1vrNLy\r\nnOwTi4M+aTS6WyfPhYeNNlqLIc0b0weITiI2rPI/T3LaV/7YO0g3gXSuAhJc\r\nl2mQnpASAIsGQCz1jbew3wETeH2FCsjJJFi0Lp+O/TeSfnn3PJkI5VFRbYQL\r\n0CqX9speyUEe3yn4XI+7O/Q1FguShfoYjqc8cZGqoZssRPjsPeXsr4DEJTWu\r\n9mqs4Pu99OpUDX0QSien5FLeqGG694tdI76Xc5uzEZTtXn32HG7sr0MeAVMC\r\nirh84KIxdbRXVD1cPPiK9/QMdmXIot36gbxKp6hdWj5EnFdsIJq4p1DaFICF\r\nlqH/qgzge9MXPzR758ilwg3uEZlIWHHrVNn55KS9F4e9eHzJiou8+rDzIakm\r\nmOK/saF4q+fLxwlX40z1t1OE0RXsA8eLVEWKYAkqWrJ7AmkwIIgcm93Fubyl\r\ncKSLWmGpliV4Ah+HV49IpTobyrhcsKKieKc=\r\n=17J+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.17_1682426734830_0.38932537187025784"},"_hasShrinkwrap":false},"2.0.18":{"name":"use-sync-v","version":"2.0.18","description":"a custom react hook to sync store, with a built in CRUD","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test & npm run prettier-watch","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"26a2bc2bf83d6bcdecce9d5df9e2b9b07ec25f0e","_id":"use-sync-v@2.0.18","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-z3fggAMAEAHPg8bVSEWGADIqL37EkfdPWqn9lhAzYvGbbWrt6mc1oR4zfQ1I20kQmWVe6Z9l0PRGw7GeCFOokg==","shasum":"5928b2e95cabcd380debdc7c3217939cc31977fc","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.18.tgz","fileCount":23,"unpackedSize":28080,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDg8pL6OzJyUHIhS0+nOC+FJKumVhkMYf6p2yllz3IxyQIgTSZjpcvvKTfcyL68kIutmYMhtJV2IdVJLL0315aCb1Q="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR89+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpx8xAAko5O9fzYOU0XhyaDyicZpUX+rvBclmoToaCLFVscN3MlHNMD\r\no7p9R3Upn4sy+2Ut89SnZC2QSVz68ypEgbq/mRKQNn51YFgrQFFDQyVVXNs/\r\nG7MqM1L2p/ln18zHvWchyIXb/+poB1hUfQW+UNjjM0spXZ+/GVaE3UxzfLkS\r\nPU//xZeUUvkYU995KuN9s5MdNTIgngESlqzJKhmgnGGHzZ5eoJswkfJYIknq\r\nVnOmMrrXN6hNKMZXn6QXuCiEPOXnKk9bMNsoZvrSXtCxAJR9eEFkzzIWC6Dj\r\nlPPd8S/GDsN+FnKYn7Qbd8yJKnSz29MDC35OtUnoA2XrLCRdq49i7qziWo5P\r\nGlCtIqgeDZRV5mtgJSGsEbAskWWYHWcfHf6JWNNk7wz6JwxDo5E0s9ROaalV\r\nCsaPTMbW9pv38youWK+Db73OV8Ll2EQ9HQE4/nyeP7uwdclKBH+IlFqRlyU/\r\nnxPnd/3dZi95sd+WKJBhDHyAtNHdAeCs8+g/8xrLJU95u2CUPPJFLNz3CQiR\r\nLZsbcCWT8aYUVrh0SiHeCNfG7sZuPPVev1I5suq5ytfumD40Ea5YICjvV4u/\r\ninkYAJuuy8HC2Is/Crj8FSxkc1y1nvab1d4IHK6OzMXUJVqDW1ReMe6DAcjZ\r\nBdZRENvrmpXoOkRPfe6vqw762CvaYxgRVh8=\r\n=pqOx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.18_1682427774388_0.9900779225721019"},"_hasShrinkwrap":false},"2.0.19":{"name":"use-sync-v","version":"2.0.19","description":"a custom react hook to sync store, with a built in CRUD","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test & npm run prettier-watch","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"f85f15e6609c58dc3f31ab53730caf4e25d4ae4d","_id":"use-sync-v@2.0.19","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-Ah6ztsfgYrtzdzaDBNozvwqp1sQw8TX1emozd8Dn4OmyGOA/k6ovo7ujmXEVPYlVXDNViqVIFgURVZM7zqVEQA==","shasum":"e7b992608f6af7d099e20bec4985fc2252ee41d3","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.19.tgz","fileCount":23,"unpackedSize":22466,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE7e1NxKXEi7XDGzgkqnY4UZP0WE0hGGwv66esET1d/1AiBJlpIvkmuNwmvPtxEZrpAgnwhq6jtYJU5KFDS/SHShIA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR9DPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1IQ//RW14vTAWFwhHSiFHYL6A/EDuZe0lWlOQE3/mQd++qCm3sghE\r\nYxQpK/GJ46R/YgaKfyA29sVdqZeP7MS6hcCnnxFtNZNyQBpC3WloAiBNZP3f\r\n4MzvlDFjer2so+P9rbJx6FF7rJyXc+DenKQ/nZGCf+U/2H0PAjIcS/w4XN4G\r\nKbuF5IrYLPpQP8F7NVG17hcAJb7lN/stCH6a9uh76CiaBQ/7iTYDLAaveNIG\r\ns+TM6QLooUJytc4xVQMGWI6+YNOvkGKDP7C0FZfO5eu60ErEXFPa4D8AnJa1\r\ntXk4+pgHEO0aqIViZ8I4IA5vGGwKvvziJ2mLS/XRhrjHKa5n5/7KkFanF1C7\r\nyY1b8Y5BmwIAxUpb/1OA/wYt7PSVcsAlEswWE+8ePpmGBHeSOMys7z7gdzX/\r\nm70b7vcnNoz+tT+YvHDrskbkB4dCL3GjHv4OVvNS2qnGRk+SVezkICAbJvKA\r\nDeLYcTYaY0kfKnis6jTsvPsoTZ1qbk1cBxZRD1BolG54OBAEFkOIbEPludzD\r\nhZR98dStSLqXpY2fVp6U5PsIa9B3JyQcZjg6768JTem8ppHYEsqRWvosYIYN\r\nvAnV7iaONO9KxGbJf2k1QgznoEXq+B2aTmPeUfOsyJ2rFWJVg0ldKZop/NMX\r\nP/+kOCjORKXa14L/X5xAY146nrzqoI5kTtk=\r\n=317T\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.19_1682428111447_0.5482307960588435"},"_hasShrinkwrap":false},"2.0.21-0":{"name":"use-sync-v","version":"2.0.21-0","description":"a custom react hook to sync store, and asyncQuery,","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test & npm run prettier-watch","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"aa3b6e1b72d6d5ffba6f05a194031e8ca01cd921","_id":"use-sync-v@2.0.21-0","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-Gn9fyMHpJazZmQPe7B+Vr8XIl/VBPQLfCYnjvbLH3I5iwhmkkRmzdq4ldhF8XkA8KJcem1D3L/4Sdb8OjrJDCQ==","shasum":"f022ddefdcf3dd69ca449169a5a9ae95a9a0eec2","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.21-0.tgz","fileCount":23,"unpackedSize":22463,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRVWdQc7H6kpmDRTrWsN8kIfhCFh+8R1Eesn2OAJDxDwIhAMoEnEfKf25tSWPlr72lJHQg31iRvi1O+GZJc1aOiqIp"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSNy4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPkQ//fHVwey5Z/So36cMWeTKd/HTInFUNPsIF1AVwLWyphAAja5JH\r\nAuh/6pfgXS/Jf3Qo2LQn4Bzgh5Cl3Us3xxv2G47aa7Zbgf0To1On8r4ef5Pw\r\nn698YRDdfelSQgCKZtO897V6V+arqI8OR2J+YHABT5yHnke1gxtzP9vqKm14\r\nWP6msT7sYyWXKc2iVZyWRV0oxwjqMak4eRs7T85Nwq4hv1NrslSuWXYv81+g\r\n9157EFPPRuVL7m0Tk4xA3oCxZdxLGcRFrxA/qJoYoNftMOhmICcDXuPyuM1O\r\n39guhnJ2RdcG9g3u4mrVxcqjhxbzbM+xE0pr8Gv1SFVifZPTEv24wfGsRuCy\r\nHTWr//g2DNkXg9BP+mKnLXhpaKNOfGIZzkgA1PIKaBIoM3MU6BgWClLMbC7P\r\nfIJEax2gVK57z4cgAO4wWBJUu+UxeMCy1Adzhz0Olq7JX05qLcz752sJm4KW\r\ngUYcnoQjLXVbekcFyCK0AFYnAFjzAkAesYt+tnDmxIzPYnjQO9QnqC53i/2U\r\nUE2NqyKNVESO3yusptti9Fc0spZ3PAr2GpLp1XQMUOEvtrx+GzyTwM+TwP4Y\r\nA9e96bIJRZpPnwrLmErfpVUD7jyGPY9Qe31j8dpSXGjkNi6QXmVsNawKa456\r\nSWGnknUg+bT8Ixs7NcRqArR34NPhmPdPmDQ=\r\n=zso1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.21-0_1682496695862_0.04152328927283899"},"_hasShrinkwrap":false},"2.0.21-1":{"name":"use-sync-v","version":"2.0.21-1","description":"a custom react hook to sync store, and asyncQuery,","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test & npm run prettier-watch","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV(\"counter\", 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV(\"counter\", (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV(\"data\", [\n  {\n    name: \"Irene\",\n  },\n  {\n    name: \"Irenelle\",\n  },\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV(\"data[0].phone_number\", \"010039945\");\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV(\"data[0]\");\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV(\"data[0]\");\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch(\"https://randomuser.me/api/\");\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV(\"api\");\n\n  useEffect(() => {\n    updateAsyncV(\"api\", fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV(\"api\", fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from \"use-sync-v\";\n\nupdateSyncV(\"counter\", 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV(\"counter\", (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV(\"counter\", 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from \"@/lib/store\";\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV(\"counter\");\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"6df949c58d62436802430fbefeff263e3608e209","_id":"use-sync-v@2.0.21-1","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-4Wh/RXkybNi2ZmmCwOLw4ad3cPClWIwZZp6hyxwmNvNOOkYXiamWG3/YZxPWcuZGe30CNknAxtC3mKqsQWW7hg==","shasum":"40032366e1ada097d301aafd90245bef0835f327","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.21-1.tgz","fileCount":23,"unpackedSize":23291,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEJ2Od3w5gWWp0wlRGAbtwP5KMLMjkL1lv7ABQDvUWW2AiEA+SUe6CPXR+7iCctnNHF1N3JaLc1IzgHG4KBqL53fCD4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSPCIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrixA//ZTew+4qicYTDa6/v5BP8MvY0AabA5d41Pb1fqSkjpK7EiaWq\r\nPppXPeMdXbIzHt+UbjMkec3wULuY7GFerW0hsUVEhQljZL4fGXaTrQ8+nk6E\r\nwcD9qzv2xFt1An46DD+ollBqWP/Fyu0anAINUO7PpTSAZ8SzS1g9bsQTteHZ\r\nhROQScuK8D+vEq+hhIj1SMSj7CczKy3fn02GHCdmajrz1Ld2CFQAYzOtHla+\r\ngrMjRo+GQLzPQHAVX28OaKfaj/W2ezgdRLjKBhGMBzfC+1C2gJbOajXYwieo\r\nvKOGwG88hC/DhQvu6MjqALHOomML71eIZtddALYL7X47A+m+li6KweGdmAjv\r\n8qk2FGgAYVW9PM2Z/XPlhlqVRcYHHtlRd0cf7JvfRJ9mghHx/r8bKcyXXN5l\r\n9CSewUPvG47+SK+zz3Lh5YPAzGgaS0XC5LTEa0y+wgOI31oWrsQ7RMjrKcua\r\nyPhyBvWJM3zegheQ9RXpsqJLECa85K+aC5+V57XmxgWayEo5Z9HP5+ExsksD\r\nIr7xCiK+H2ZDlcciFUntlhHmJjOOeN/xwx1bi5u1qYRDm8zAcTHYlDcDGtpd\r\nUUof+feisIhH/fvVaEvnIhpCvJnbMC7F6RMw6sNW3hhI3ewL8fj2jI9yF5kE\r\nTYmhLpRAcsqYYeEZvhFfO3vj/NLmhwXbwAE=\r\n=ewMd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.21-1_1682501768494_0.7276788724168513"},"_hasShrinkwrap":false},"2.0.21-2":{"name":"use-sync-v","version":"2.0.21-2","description":"a custom react hook to sync store, and asyncQuery,","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"b8fd58ed52c406e3429e206aaccf610e2d1d5638","_id":"use-sync-v@2.0.21-2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-2Scn5cGfiWnZE6IeWKA5p87XSBAJCr2FC6SlJEmbeIxtCeIfHL31f/nqibs7CV560wNDu6Nbipn3GBAM3jpqCg==","shasum":"e41019f743fdded333ce1619ea3e94a260ce31a6","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.21-2.tgz","fileCount":23,"unpackedSize":24591,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJ1Io0X3zEHecFEgeec4q+E7MiKB0hBrmDU6rg4iyoLAIgCo8Ok679bpeegsXktbVTEFyxmkdS9uFMS0OKrYkrvIE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSUuoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdnhAAnC/xTz47q2MD/nFsKx93hQrx3q/dRQv93P7AoTALDL56Nv4y\r\nMNdzKiAanbmdZIXhdTl+I9pcsaPlttih4huQ01aZPvUs9zsEooNHrIGc8Poq\r\nFxl+Q9HZ0EHH3dJ1H4CxSUcPn8AG3uk09lI+zn773dUV2P0Rkfcn5OfAwxFM\r\ntKMla/Lgvn7wrQ/ccDCCUusAe4H1xU0wY84XVlB30TFIdo3neqpyZg7bm2b0\r\n3Tci0VYnvQ7mnrnbqE5JCGuB2yTPXXaAOotn6NbpDq+2EfqCBTe08YSP/7Hb\r\nOkC6b/p/KTZ3I9SIxJCIY64a6MCo/8i7+G5+ZcE3LRXeVzZo+MzQMNeTTbN+\r\npvY3hkKO35XhyuETHxP1DGJvGOIGQ2ZYLvoh8YKyZYEqKBV8VJa/3Gf2wecE\r\n6xnkmontUk4RHyLID/8p5/dwuGzYttTfwDYHQVTowB6VvjwY3Pj8V29LP1c5\r\n6u3GoPH46+BJCKT8twlEmSyG6/jSDoNR10Z0yb91t/kLzakrRFs4lGAB51nG\r\nFFz0HbBcUkdf8JAlmiBs1b0RhcP+jKFwGWBaMZA9ZPGajQ4ugJY1QasLRG8j\r\np7qi77hTwGOTPAn2W4iRgis2r/Ddm+m0iBizh27Y0gUH2heAXblgVohlM+Q5\r\nzA5bfD0B7cGBjwBT7dBVdt+2wYOnRY6c7aQ=\r\n=oTZt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.21-2_1682525096774_0.4544234536119318"},"_hasShrinkwrap":false},"2.0.21-3":{"name":"use-sync-v","version":"2.0.21-3","description":"a custom react hook to sync store, and asyncQuery,","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"89060b0ce23cb0341f66dfd7d8cafba044220ea3","_id":"use-sync-v@2.0.21-3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-yINMbcmm+QezQNDGIWGoXmPFkUbklJ3GhWj+oC2+qmNdYgDXYaqNH5I61UQgunhEl0GKEqh3wz3+Hq+pFUd5yg==","shasum":"2bed01d42e28dd36723ad341a967958bf16474ce","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.21-3.tgz","fileCount":23,"unpackedSize":24591,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtk5S2Z54zNK76uMONdDUSxCPeueUIfJ/gy+nl8bmV5AIhAKt8WyYcQd2ByRdw1T/B7HsXy2+YJ0BELuXfJmGxE0M/"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSU7eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVQw/+NPitjLpL7yQ3/u7YaEMYdEKQo+o8YczxExkxsZqAl21lFVIv\r\nAVtVWrNPDHl1rXYox0vrsRaZW2ZsPvJ0DIJJZVfJ5TkMYEm3vlSOg0VHODhF\r\nefPn7o4Npj5Tc8XyZeIfZEGVaD1F7V5RK5msFV78UC0TS1aDFIIJi9oWqDqu\r\n3PNIRU48j9gXP4i+Qa2Hhh34VRazTNq2q25ICeRZ/vHy5iYNPg+m+Pwtexh8\r\nSHQi28GuJS4TTC0C2d1hfqzlVFNvnYGzihw4ML/L46YS9cAhgueymhcFiK2P\r\nBRCXsSxoKg19MhkhPJeiJaBppO15+feAT12HaWAeJpj7NUQhMHvp5Rj7iPZL\r\nKCO+0XQgoWPtb1+nQJ3GLI1PEmUjn9yTWqiQX+f6a57IS3Hs2QnMhlXsBMcg\r\ntMUz47bg47RPI+UWxFyk5NjQwXRj+smyGu45hWhHkFlFF+nm4RoVzHgYGlER\r\n7Zu+Kr44AFLwxzX/2Mw2K3dprwZH9Wyx8fU2VzMX9EdP7XoONc+DbBtcikDI\r\nFkgAYhS6vvwiHXHAmrGJcHt2yZEmIGRq9slSof1gLbTaCzys14v60s6cjic6\r\nk6F7c3IpT8MTf7cAWnkgP+3vLWd2//MZ35zbigWoQ/VYfJIBwgs3iNtMyBwm\r\nPBzLDlZosza952dSTAdAPyeuQt5fZ3WUVPc=\r\n=FVmy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.21-3_1682525918767_0.36468865282391194"},"_hasShrinkwrap":false},"2.0.21-4":{"name":"use-sync-v","version":"2.0.21-4","description":"a custom react hook to sync store, and asyncQuery,","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"652e9677932e083616462a9aa8df3031e7775fd4","_id":"use-sync-v@2.0.21-4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Mc8xQJtlQYODQ3jwQXJ0h72JqCflpNhK5Yo4ioRGm2X6UlW4o8d0eBLp+R3vatL6E+nNfRY6cT9EHlrk8sfoQg==","shasum":"459c095a878b44202b6022a36d77974867c80150","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.21-4.tgz","fileCount":23,"unpackedSize":24731,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCKlqQWaNOindWpaVJxodmtMUjXAneFxxiOdVmvWucnAIgaigEQNFxKRpFdcdOnOrRSbOBPqixPR/nDI+pr8dWmtM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSVGhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpY3Q/+K62uo/F3N3EAt0eX8dPL9YKiiSA7xB8el3kk10BOETCi2p/B\r\nsfCS3lvoNqPl/Ndissdo3bswMcJnGKH3N/MXj6c27QwS+HwYAc645JMTw70U\r\nswclfvX3/LSnrGFrSZW8l/Na8yuyl9+W6Se1DFddhEJ4KfKN0upin7azXA1m\r\nodazRYR2SG9mv1mTLw/BT91rdzxFMvPIL71HvywstDmLIeYyr0XQL8gHXmyS\r\n4ZZHt7gVDHMaZQa/F9Nc4Q+/cJ1+N4dwbGDV2DsbocT/jgMKjVvl4DXl9HOv\r\njOosYUszjjWPNGvNO7gPj2gZ+oWSNMWJnZx2bUtjNSVoPnJMOJs01alAdwoh\r\nE1HgL3C42aJItBskVrj7gfq/Cv0kNNYF7+fiS2nrpfGNiDKc4WvnO2qNfb99\r\nxi2oqKOfJgx8zxAaIilANN6sRJS9DtP8ie18l1gbR5xtnGKwfy+GlADDcSEL\r\niXgbY7xJHQ7VCURrn65fKdqviFHxOR7qY4jCwvNzn0OxmoLpR8CbNoKLv10e\r\ntYshPmjpzcc6BTW8xA3Xq3m1RyZzOlHEdzNA8Z2MaoFU1m8Ngg31lxjR4a1e\r\noHTpoWACZ7BeIbnUXNmQoY81IsTbFkZmZBjYGcHbxymIbLGVHIARrwqrFFuX\r\n1gGee1VfNCPEwnE0zk0N0y9ruoUPDRNCiP8=\r\n=pObU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.21-4_1682526625090_0.2584139134534049"},"_hasShrinkwrap":false},"2.0.21-6":{"name":"use-sync-v","version":"2.0.21-6","description":"a custom react hook to sync store, and asyncQuery,","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","test":"cd test && npm install && npm link .. && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"259d9222a3629b4276643e3366b96da9d4ad94ff","_id":"use-sync-v@2.0.21-6","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-E/ootiXrFWacW2GCm+SX7y5dowdkG34qFs44TxWScJodR8CBhGVY7acAVnKSR+dITMcyFYeTO2kuyqzN3Abrxw==","shasum":"33e66a36eb8ac9ae5ce18b80d5b004c5f756ce62","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.0.21-6.tgz","fileCount":23,"unpackedSize":24579,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC7zGqOu25wfl6JtiuK2gX0B1kAhACeFcXlBVY/VQz3HAiEAjjSy6jJ5bvBFcDKrdEqmnKABC5SwE/gJqlphMKSoAxg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSVQHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6mRAAnMbxkq3N8N32TKFrjgI8vCErm7l+Gf8iVgzEDas2mtkNaueX\r\nWc/Irt11GOgm2UyOAY+fdP3fQ9DO3qCF2RODsH2WmJSQ6ZEwjYD+yD/v4Hce\r\n+wYIl1rDUfaNlLz6MIQCKzw15HNeJxRW1k6ZFLzXYwHhuGk3YCNrT8/srRZQ\r\nu3p3xMVNig2VQSxks0/XlmnR9V20ztTWdpHGRMn73xNBBfDrK+fMc55lq/4v\r\nOKy7aeO2Zh4NuB3sVISd7kb8l39JvapDSbU0kMMEMuY9M33x3BDlj0MUacTk\r\nDOm2emVMDJMUj0g2aKVqB3zxh71Z15aRYZTPFZuMtEDknH3goRU01J/YLr7I\r\nMabAf+xQuUWGXbUGt7vkkD14jLR2bopYfsjATGcDyhtlV9qLRuLtlZxAZPn3\r\njUp4TqrUoGwHBn0D8S65EWAxW5Yjw2GWH5VIMfj7C/F1BsVlzGWouXJYP7pX\r\nxZi411GU4nSYg3xNWjJzXmdANytRi9nx6+DcmySpplYSzMlmcrxZ7OeNcCRh\r\nEaKrIWatZr6xkkzbe8i0zCHdJyBC+o5sRPpdoQUPRteOLr0MvPkEpmkKwZbq\r\nMLVeMP1D8HTlcw5eMt9AYtjxMATtXRnBlGPq/4cvfHU/sex7chJeR7U0lPEp\r\nrC4S6bwiiRYjVFdJ1Ymkz/0ju5q4O4gKmJg=\r\n=z/g3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.0.21-6_1682527239163_0.7740053668201456"},"_hasShrinkwrap":false},"2.1.0":{"name":"use-sync-v","version":"2.1.0","description":"a custom react hook to sync store, and asyncQuery,","type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","beta":"npm run tsc & npm run typedoc & npm run beta-test","stable":"npm run tsc & npm run typedoc & npm run stable-test","test":"cd test && npm install && npm link .. && npm run dev","beta-test":"cd test && npm install && npm install use-sync-v@dev --save && npm run dev","stable-test":"cd test && npm install && npm install use-sync-v@beta --save && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"aca85c1a7701f251f95827c9df953040a3360952","_id":"use-sync-v@2.1.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Jhq8K80hHjVTgQrmF8rBqn+wNnrgyPOuWXw4jYkjugZbFd8JWZPS97ny2rWR63U0E4vayTuDkz0r2pA9aC2f6w==","shasum":"eb24180ea37bb87fb0b849ae2bbf08238bd92271","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.0.tgz","fileCount":23,"unpackedSize":25055,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHXJjHxva+t32SXWwo5XlVFD01pUCm5/GPisL0yBSJPxAiEAl9yNyXYwBi+A+ptNNqPzOll2oavrMERs3OdHA/2g/vI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSVdPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpuvQ//cDAlZFwm63pSyR7imSUPGuQeriyqz9EpcMig09Rr898Zav1F\r\ny21fJsoAI3JvAI/miNKD7tOub9kfkfjeIpZ80Cy4A54MsMwbAV1X3KpLv3h+\r\njo+lr+rwvakVBsAMwOFYqlZ8LNB0oEB2lSMvYaNowsYZ9hQbpBsWvS0jjwy1\r\nevfiClyy/EiYB1sLYNI7zD7bPXiw2jPhBng5BGbAEBGQEKuotOOKksGkq6i8\r\nU1kUIjzv0C8bkAJdMJVE2ThjpISM3uwE5a2/vny2TOEpWGBypPsyhaL4OKck\r\nrCrFbqriavXy4Bo4YkR6m7IpmU6KjQgZYjWvagG6XCS0GWirpLFB5i34vYOv\r\negkXwt4zWUGDNQNfRa3jgRGUW8MahWXr/tZ0P9GUJ5Iw1F+9+H+dnixXb1Fd\r\nslrQu1PRAdL9CFzBUQC6tzKx82aQDpL9d8ap4m31Z8U1ExIOB4iWVb9uE9BN\r\nEgEzvvczjtXVO2pn1DjVXDIZsT/AWT54294F/XWIux3W/Dr6Zm4Fal61lzEN\r\n/vyOTEynC61/ibBOZDgMf9C1xLoNstPp7V446J7TfMozC4FAqe5OK14R1Z0W\r\nFGkO3a5P8LE7iABxhheZV8JVnLQW7LH2QDU6VkLhVdbujqF+3TAk+iMdFoOo\r\nlv/1tWVzyYPG8MxA/Qkkyn2jhURK4zhCX0o=\r\n=SrtJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.0_1682528079772_0.4235010508137329"},"_hasShrinkwrap":false},"2.1.1-0":{"name":"use-sync-v","version":"2.1.1-0","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","beta":"npm run tsc & npm run typedoc & npm run beta-test","stable":"npm run tsc & npm run typedoc & npm run stable-test","test":"cd test && npm install && npm link .. && npm run dev","beta-test":"cd test && npm install && npm install use-sync-v@dev --save && npm run dev","stable-test":"cd test && npm install && npm install use-sync-v@beta --save && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"c8e17e63b37d0825fe39b492e3ef5a323a3d8ac8","_id":"use-sync-v@2.1.1-0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-nqCuabbD98tZ95/ATlzy1m5Ll1P91AaqNt/nKaciGfkaJCuscFxzpokdSgP18VLEctS0Eq4vd2jqPGTIb0w+bg==","shasum":"922b2d119c6d95c98556f9cff646d9f0a0316eb2","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.1-0.tgz","fileCount":23,"unpackedSize":25088,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyA5Wr6ZD7gOeoOWRMdTKccE2olc0bN+DSVpO9xNGsmgIgTrMlLAyrpOlbXyrSV8cgmA2Q14YQYeAhieVQXstShYo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSdaRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIQQ//RyIkbLyH/xL6RwElBz9Gevbya2GjAx8SPDHoUTNMrwWsRcGn\r\nF7UKWowgP2LNY+Zi1Sp1betRuv+eu9hrKUw0SpUas3acUznwvthvEJPGc7yE\r\ncSbkbtJR65gdmQcjIzhDUyTdX/0qEM9Hty4ZDlMlp3FmV7YoAmHYSjfgza8t\r\nQjvotpBAQ/kaOgFgDdXgG7eCw2Nvjc0/ekcnhX2rXxwY4E6yBx75FjzStBWv\r\notsSjkH8QaZjqu8ruC0jip58h16n86QpUBCIn8boCjMqXsGIHKNTLeQzKCsy\r\nms8Q/IX0ScTqOWMw9ZUSj3O6em9pulB+aSBuAqV7csNNS3Zu/MoTf+9uzTi8\r\nkr3fIRyyh1d1eAYyKTGpH9yHeigrPRrOCZjjUAUWpTd1dJrYaDBjDua4iB00\r\nwyBAeZmGW3BHfHHSRgNeKcEWWNJhDaQhgV61ZDxyggUHedHXd37azGBUuB8n\r\nPxi4VTxJiIUUV+rRX9u+Iv2G2Hin9Vd0RGZhCMMyRuwr1+3uSvDInKmwd1bI\r\nA7Rmk8E2Wi/Gg1DkMXOaxrHhKEAF+pGihvlepDKw02XzbxOrmXxowmkoVwbL\r\n+Dt65cd0rdaNlH9b2eLp8nTcdIQncT+aG6mR/hB1OL/f4ZxC31o0DNYtRBkm\r\nqaac2xSkkyvsyXfTrhERYX1fld5cmpgPcGo=\r\n=dv76\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.1-0_1682560657286_0.12214568611381083"},"_hasShrinkwrap":false},"2.1.1-1":{"name":"use-sync-v","version":"2.1.1-1","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","beta":"npm run tsc & npm run typedoc & npm run beta-test","stable":"npm run tsc & npm run typedoc & npm run stable-test","test":"cd test && npm install && npm link .. && npm run dev","beta-test":"cd test && npm install && npm install use-sync-v@dev --save && npm run dev","stable-test":"cd test && npm install && npm install use-sync-v@beta --save && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"0b90024ef70ab4c2799d7196f270e0844eee57ef","_id":"use-sync-v@2.1.1-1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-KfPiN13q8FUbEqtnj1ulKXpgv5Bv0w4ccBJgG7iMqfrZpSzW/j2ZS4MvOLMkaz9mRO81CosgD0m+BH7EDZL7TA==","shasum":"8e927c58388c516fd311c4a1eb2c7be77a0070b7","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.1-1.tgz","fileCount":23,"unpackedSize":24904,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOnvrgoC52Fbn9b+kd6lRpEijfBa/iFbinpNxi8QZeqAIhAO/tszH/lLO1THkkyEy0UYk0rEifu3Bgjqi6KAWjwtn6"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSeoeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSIw//RCiTwnSq3+s7CdavenJzHVncVReuVL9EgmPyYxFpjsYRRzdY\r\nkvakQZ92ISKkc1n99qnGWdSZPSVZDQaZUuT/3ovdNO11JpRONBDYv0qMNFJu\r\nXMi4wo0CtTy3tsDZ9T5Z3Bv+bcT1xkTA4d008NPP+9J7IMxyEpPuVo9YGfpv\r\nNsgwei15IBeg0Z+wKZF8le0V3ohG6awWEbJ8jPUgSYjGSZfOoTeGPy6gHX4u\r\nOMntsfcfYVSohNLzRYjb0Epxj4cZs9CKDggiVHqZNW8T8m4xCM+w5/UZLgLu\r\n4Sf31aIOQhwyfyNkLdPmuQU9srRWfG2U4CWFT6GwA3RGdX4sCG04cKvaO0U+\r\nT/sBHkRt9j1ZaDMJe7sGsJ5deriLkAgE19e/9vU8Z9ykJGxm/Ew/QfR/iSxr\r\nWBzlHKabdJ7a5b3EFz4fUyHNbeAQKMGuQweV3ro8twIUvsSIjq5/1lFWGJ/+\r\n5JPf8wwiYPn9vJk7fQTwMMDnbdKRD593mqKcoh8wDL62Ss43IBYRj4/04F69\r\nER6OdViSPLIrAQzQn7S9fkuNXjWdEqCf+HBgM9d99lggZEfVCTOamsGKnOXU\r\nMpyS/1inlMGEyj3CRUNTXw7CXIeASt41yrOI19QJKEALZsrpnk8zyJUOtjQL\r\nMdy9nk4WvH1mXzcFJHMe6Ffw/I9/yNEbyIE=\r\n=UWp3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.1-1_1682565662363_0.5895383459798313"},"_hasShrinkwrap":false},"2.1.1-2":{"name":"use-sync-v","version":"2.1.1-2","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","beta":"npm run tsc & npm run typedoc & npm run beta-test","stable":"npm run tsc & npm run typedoc & npm run stable-test","test":"cd test && npm install && npm link .. && npm run dev","beta-test":"cd test && npm install && npm install use-sync-v@dev --save && npm run dev","stable-test":"cd test && npm install && npm install use-sync-v@beta --save && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"b3af49ce2793be1427386cb1801153d2954bc083","_id":"use-sync-v@2.1.1-2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-kVXze0HUjoqSg3p55+XVtSly7YVO3K2QZuVhgoJvaRivPv40T6IqLuv+ol/ekEHYSuU11QlL+Yf4ql7Y5UDizw==","shasum":"d887bfdf7da0c86094e5e0f041f463e01d200903","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.1-2.tgz","fileCount":23,"unpackedSize":24936,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIExPEuOhYkREInYWm+4ATxMTw5qn4lPPZydPYeMqe9H0AiBX4A6eZnGI6LisrF4btZrcR6isuii4MK/cFIS7MSSIcQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSfIrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSjRAAjFOWa7+te6ChoNsMyz/z6R6Zogc0QUWl0vHkkMpkX5dJDbrm\r\n66ZFUYgyFTv1R0dTw7RH7wniZBdBueDd7BQvhO575WFpq3p/7n8VemQyY7lk\r\nQma7M3gaMdXzfYKttkqYxvkSyDYquG5CsZXKgzCrMuEFamAVqUgtdaFuDNxv\r\nfQq0SbuRXNi4Wh5rMadD5ccStNgVM1Xj8XlqJcO6JUzdf0jAl/RIpYwEDda8\r\nRbQ107jy9aVIaC4mK2cbX3RpmUJPLxGs9YyxNr9iojC+nvkTF1gM0t01HzKf\r\nKERgKu0rLQhfU26CFWlREwF6Pky2msM/GquK1VjVlohv2xkp5j1zkJx/a3LX\r\nkxvy7I/vsjINZBQMYeNlJl2HoeWBDNTXROF058twVfNeX0tVUs9m0c80xIuj\r\nFW6czTOXyH1jap3vKC38FN7VpZq5yjXnMu12vSOIAdBFggYPwpZJ6EqT2Cue\r\nKVyn6kCnix8To305kXsYRu6mZt5YGP/A+RYE+NTrktGNrJRsLZ/XxOtUG9qd\r\nqLy2ttD4y0pu7u/6FaSHukQdlIQmpPJuIN4eNii9AbIo/W3ip7Z6yk/82ZuH\r\nr9ODTXhWkfTm6Wdc7y4q7riZZbw9n4ypIcCbMFQc/H96/SrqWlBt3joI+GZk\r\nHFbP8T8SOAPD8ej6+yg6owKXpBMAqi7o+qs=\r\n=ntVE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.1-2_1682567723440_0.6068977178703836"},"_hasShrinkwrap":false},"2.1.1-3":{"name":"use-sync-v","version":"2.1.1-3","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","beta":"npm run tsc & npm run typedoc & npm run beta-test","stable":"npm run tsc & npm run typedoc & npm run stable-test","test":"cd test && npm install && npm link .. && npm run dev","beta-test":"cd test && npm install && npm install use-sync-v@dev --save && npm run dev","stable-test":"cd test && npm install && npm install use-sync-v@beta --save && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"cee40519c87991b5a90e086d0afe0069b8887de8","_id":"use-sync-v@2.1.1-3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-hq9vPQrS4Bvm4CSytR9EJLrw/y6xzu3p71spvJIJgsM8iqGWjSWqmLo9DlMCKjujOjE7XZjK+EFTa0DAIs7AHA==","shasum":"0b54168c040597492972e4b459bb3fd5447198dc","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.1-3.tgz","fileCount":23,"unpackedSize":25453,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtoEfsRMjcXk3uVoYiFEeTf0j2lsu5gU3GTb9Hm2z0DwIhAMpXLqJ17PFrqt8f1Tl8vakbYbnlmE3ct8Jbn59IWvz7"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkShKcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOQxAAkNlgBevd/heNozdtQHeVd7Vqco9PbSrSPf8+fXoNW4rDnkW8\r\nxICwMfzl0WsI6l4fzGpqrn2Y5mCGW+GZcEbCBy+/C9jbeiofKxe5Rf0p2hv8\r\n6w8diD+VuQkBoWf6rNUIKbsbYjIH+DCIqk0N8udzbmtHr03SO5z8XrWFXOsb\r\nMPQZl9/SxXtvO6cK7KbQJPNgzmtCNOzl5eXQbeh7ftqXorIca2UJVDhIXsfY\r\nZB0gMWD28ZR7bLE0Cs1/ldZsCHXa8hnsjFMGwX/Dus+TaOyxXQ1F1rPj86BX\r\nMPeMbhhu++0S0azQbsESKFpuDXRFlvW63EM3SMaBfLaWLbce5+fg7LmEvUXW\r\n5aBDEYqFccvUbYbcCACRxGbRmSU8DjUE3Mk4ST3E5K82uy5/Wy7sAQDZfo8J\r\n6go+nHdJo6bH+pLMudC12w7Vmja+o/EK5+jvZHi7WARQLx1hhM9NW7WPGJWw\r\nHqeYhtVlnLpvre0MUKsE0NSOcDmIvB2pVjGMpdfEL18hOgFpLzuTXQtT+NYS\r\ny8ZEhgOt+o9Lk8WFRLp3WKLsn8O82O4rAUX86Z+A0d1E0l++1W55IE3NRPC1\r\neTmyDElYs5ngXXGphYrBfQNEzFPujEmzOrcnXakoERfi7DW7deL+1RlQmeNo\r\nzeMCzPJJbe3AzL2S+ilvG0koTSkn1kNV0Gw=\r\n=k25d\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.1-3_1682576028216_0.1055016227514074"},"_hasShrinkwrap":false},"2.1.1":{"name":"use-sync-v","version":"2.1.1","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","beta":"npm run tsc & npm run typedoc & npm run beta-test","stable":"npm run tsc & npm run typedoc & npm run stable-test","test":"cd test && npm install && npm link .. && npm run dev","beta-test":"cd test && npm install && npm install use-sync-v@dev --save && npm run dev","stable-test":"cd test && npm install && npm install use-sync-v@beta --save && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"aa3cf5145cfb584bd99eaba4d92a63edad610459","_id":"use-sync-v@2.1.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-/PTBa3Z5WY0IRVVsQipB2G0Y24yb6sOiqvqKyt3WZb10IdhQZwSFbtqAHwkg3U+JT2m+Kn001/d119C/aYxdtg==","shasum":"4a0b093d636ed3ce6784e4800f8135907b7cb336","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.1.tgz","fileCount":23,"unpackedSize":25317,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAlUsAH14wmULQOx0pmKYXlK593DuPVZL1YGj/duSMQsAiEA6ePXo1NHxJwIzbwWRQnkC5lKGoatpUWwdI+mw6seNEM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkShWDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7mQ/9G/2Zav+NTwcEX423DIl0OfhGNOp667ysDB4Qt2pwCVhfY+x7\r\nzvLvVj5KteTYQPpZKVgRQNvECMPAIcnvfeJHDlQQOWDHVOsH+la3c8nZA2Fn\r\n1Eb/AwGWIVwLZ5hlayT9KDDP8QzvOA20AESyeksF9miPxd1dAmqrdSiy4gqo\r\ne29yvJlh7E5W/c6iPq4p+aoddH/cuqDJ8ER6AQc3VaflFw9yeJ1zTDM875bd\r\nh2/sjAjevTXESMEAPhhccAsrg2Fbwk21mIRVlj2zLQgZbIv7zaiyPha48nsI\r\nAzRT9K202pgcOTToWwbpzwfqdQPBikTBbrnsnWqFU6aOF5uqYzMeI/l5qvd6\r\nwTN3TCgPExUJ3CwSua2YkamBgYBnTgi3V9KFKNTveQdSsm1yFe7kQqRL5HlD\r\na9EJ5H2/DncPd6spz6JIlhKpJTtAHAZofYeFd0zaRYKb9qbG1AZ0Y3Z4+9rN\r\ntvO+n6ZdDt1IDutGDJEB5vFsNGhTM9QmrBEYOsAr00xl1UbqUzS+s1byH4Mi\r\nkV43d9cZBh7nnOJIXtNaJFb8+pmkgiSDpX6Ky63ikG8bfWj5kzI743qYuQ6Q\r\ng+vqFWK++9uwRNEk1Jo5QmUT/TULhxmp1w6nKMAFnBI2tl3F1M9Yr2JTMH6t\r\nUyuzWNmr1mKNJ3q7JYbaKaKfKB9ckjFtZ4E=\r\n=95Vo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.1_1682576771016_0.017682705647946495"},"_hasShrinkwrap":false},"2.1.2":{"name":"use-sync-v","version":"2.1.2","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","beta":"npm run tsc & npm run typedoc & npm run beta-test","stable":"npm run tsc & npm run typedoc & npm run stable-test","test":"cd test && npm install && npm link .. && npm run dev","beta-test":"cd test && npm install && npm install use-sync-v@dev --save && npm run dev","stable-test":"cd test && npm install && npm install use-sync-v@beta --save && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"c3861f2caf2ea225a10e4238bcd0446970b19cfd","_id":"use-sync-v@2.1.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-viBKx9DzBx+txDTLB0WqdhxBDxkqeKSdrIAYmMqJwOTyeS1ol3cvNAfVkY72bpiFo6TajpPPu2VvjzHsRzfpdg==","shasum":"3b325bb39d18cc256fc801bd1c7a58243625c9cc","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.2.tgz","fileCount":23,"unpackedSize":25319,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7iMNtqd1oQxgzC3SILpCLE4G2yN6REFonIErFzaMSVQIgCCUzdwwH1/0t5GKmEf8cr3mAt9SC3A7hUmbJ6TRD8OM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSpl/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXZQ/8CY/DFYPfqdWap6dyswFJLvCB6edk4jh5L+mjQGAQTVHoamce\r\naRwbebDS+I9z9sLTEASPJnHzkntzytrdsIFrz4YHdr5llLdHfJ0UOc6R4vCQ\r\nbhR/+KmJMZBc/JJ6ZSnUPM9Pv4+YO4tKzuHwA/z6HCnZtOGhu5pkE7EyLkJ7\r\nP52s2SjDW7hLiRqlvFqahUar/7TmYCmVEvADVWXeKO7qPpMr8hL0mnUrOBL+\r\naFh4rnSk+RyuAYxcu3e6hgOItYu5jiXjpkoobnduuiK0AOfJVcjch2FTNG9P\r\napWQ+By29ups4Laqj+HoqzG6IYs8OzwY5S7q49m391JesAohPLg4mu3nAFlN\r\nkYCmMebQaFOLsVam/k+OnE8lJE+eaBUvbIA0nelyZNVTK+6tnuWpuYDYVCiL\r\nCi9HeHBMaoHM/ZzD5TuIPlJHmvYMK7qvpq39xQyqgld3aVeEGOzWNI519yQC\r\nFUS3JXdkk6nb1X/K0vICvqQFgb35UZxq0oF2aRh/C7ameIiz4O8FGd5gd6mV\r\nF9CzjcOLl64EXiGdityi2+QdGS/1GGKuWH091Cdg/bxSieUbAWUyYBDj1g+8\r\n0ifj62RnL/tcQM4EKZVFx9goAIpxIdCSsI1+nRwWMpFwkNYr1DYG1mjgPN0h\r\nLWxtW3DeclL0z9DGhAMCbOOEXO99psFLcuE=\r\n=uoRL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.2_1682610559545_0.792513060552702"},"_hasShrinkwrap":false},"2.1.3":{"name":"use-sync-v","version":"2.1.3","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"tsc":"tsc -p tsconfig.json --watch","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test","beta":"npm run tsc & npm run typedoc & npm run beta-test","stable":"npm run tsc & npm run typedoc & npm run stable-test","test":"cd test && npm install && npm link .. && npm run dev","beta-test":"cd test && npm install && npm install use-sync-v@dev --save && npm run dev","stable-test":"cd test && npm install && npm install use-sync-v@beta --save && npm run dev","prettier-watch":"onchange 'src/' -- prettier --write {{changed}}","lint":"eslint ./src/ --fix"},"gitHead":"40b68e607e637902a87eadf69f79872ae9a7bc0c","_id":"use-sync-v@2.1.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-OlkUDvrZoTJx8SC5nV+8j0rQm7hss5CU164A5U6dhN+JD3gtn9lS/BjDZ+TIu20Vxf5jFjJU/vQtNrce9olkhg==","shasum":"30d78ddc6e7420ba541395ecf9cad459c1f15b52","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.3.tgz","fileCount":23,"unpackedSize":25254,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyiVJ3sLSekwTSmALdHCmlNVYVr2wKv1bQ5J7d8MRIPgIgLBJEhRBQoIKyaMWV469FsSklokDzmfnbE5PYb8avnn8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSp/vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqifw//VCVkHm3mBxkBYrCvEIUJhJWBlXhUqSbMVZ0IDVV/bgt9fjXT\r\nGIIqmby1qfWq6I8lMrA3IwoR7+wZmb7DsYaWNKjN4hjVWpEFjHUQukZNanjC\r\nJS8Dli1DVho3cC6p71yK6kqHaaxLUNrizT6b9yVsyhTfiZHTHTKnsx2TCZDt\r\nbBOM2dJ4GsTJmL3dSGxvAhZV9o511+JR9N2FpJXr0iCE6F/pxvM1RIlevLrz\r\nXawOlcpQSQ981Bl9NIIpMb63O8AoBM2SzD9vmEGJQR1cZm/orAaQQkGVPZt1\r\ndLGdaFevU23zBT0J2SCFe0t0RJc7iZNC3OJlqLtQtGEfWqEO9rn8itVLdsTN\r\nN+9W3FldqrVlWT0o6cknq9NvEhHwbUQo80iBtu48v7SkMWy27Psky5ar+T9H\r\nWbCqytNFN3U0ixuf4Lu+ZH+0C5F8Lev9MMVSnjulOPCZrq5FzbONa/X5joy9\r\nKe6pxxkfHh/hE1Phkliuri+LGuxd22vhuVvw83ZpiLEhF4KNKGpySmG6Ksl5\r\npX5vT79iz3Sg0jBzp/3Xg71CD/yauXZ9I7X1SOzbQ3u2CHuvEIPxRq3nbcww\r\ntSSW2iCc5R7w6IwaXuVYuHWPH84SP1ohirCIse1E89I70HHPqeyEQHu3uLaf\r\nWf9cvHHG0kXYqcm3ifmJ4SrmJr3LdjTQzLE=\r\n=GNv4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.3_1682612206938_0.9002813086554264"},"_hasShrinkwrap":false},"2.1.4":{"name":"use-sync-v","version":"2.1.4","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"38942c3a285f822c6e85a271d4493f0df78fc9be","_id":"use-sync-v@2.1.4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-R8OLCMheB0sK/x2gfq99nhN/oXcXWXTY7roJFfUtdM4rW+6i170r0UY8JFPtB8YUyilMTElsbdFaeUm1cEZckA==","shasum":"c5c2c4618642ff6bff945ce84e26e5194967e992","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.4.tgz","fileCount":23,"unpackedSize":24442,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYKl6YKoNDjv+fNaZm8MurYYqUPuRT0LGcuEe8TQmlegIgN1SJJLXfvykpo16YG8/jSlrggw/kRgrioHnE7jJyNwo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTO/JACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNXw/+OLUFjmOLeBsIaNwRnv0kZW3lyRNDjSID+hAPBrxOxB80LwtM\r\nv1vVVue2N9fmBwy70da9JLeIOpBB8j4lEmbaIVFjGwhV44NiAvoy6R1/h0Z3\r\n9ROtAyrnZUiu1ffc3gzP0qQbD/IU/fX48SgCtiEb1t+u7Cv/MpzTnkCCAX79\r\nmqhOiNsmdO6pda+klIN2BS3kRS/UyeWUmF/fpRZcLkSFQuYgSeoD23AfTBfI\r\nVjsENcGKS/xPjgGcUVnUMxE8K3AzB14Jok8VBmhQNKSY5GR9HFpA7kufiUwl\r\n/sApVwLjFfo+666mMDnfOOVTd2RVV5fUqqJ0eC/MWti7PZ43deh7CTNpEXaz\r\nuyqWPIgy7XHsyv2RH4YYUkQSknQ0/NWq2SH8KO+Yp5UFd5hRU3nn2j77RrnK\r\nFbjPuSenPtSgAHwVToGdvT86ZOZe/F9KW1XdSVp1ORPjm8jG4M7cZZfIyFmT\r\nwEuRsUMdfhzGpq7xd65waFzVgyMHkZkkqyyYowH6rzfrpO1MJVs6B/pur8jW\r\nbyvNwBqkh6wzKuWPzpx07uvZrfhsJGtBOA2zrpRXcM8wK7RdD4yv0NtBcz5+\r\nVxUepOYLsZGbcYCMoFhpBi4EjCX1d6pVpMAORJ+oqZsWVt+6D5abe2YcFmnP\r\nyLnQC4Xf8GvaPY2sAe5PBp7w8jWfOzGicMA=\r\n=bpqP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.4_1682763720782_0.06473180724523542"},"_hasShrinkwrap":false},"2.1.5":{"name":"use-sync-v","version":"2.1.5","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"24f55aac7169df72b5124c1c74aa334acba47e08","_id":"use-sync-v@2.1.5","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-1W8pCfb8/n7z2cacl577tfaltbqiut2K20lY5VH76u+kNRicVS5slIdo5CnsVHedoLqUJ95mkoQDO0PuazWCKA==","shasum":"162e32a74f37b14c81b4dbb1643adc45944c8e9e","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.1.5.tgz","fileCount":23,"unpackedSize":24328,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCD9qpsFWCzcxkumy9Haf+JpewwG3sYaVBIskS3rnzvowIhAKqNFf2lkSexcD5kCPHw8+n2ELhMLZ0B2XN4LBCO56rp"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTT06ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+dBAAi4rGn7b2nNWDJzmRDBCm37c2idZAptIrVkmH4LhXERk3K6HT\r\n4O6SVA+Bv1jrnSP4rZdAbWb+NDEigvZDsZLGr8FVJxOFxfO5ugTA95pK9q3c\r\n0L8H2TpOGR/qjwmAzofW+SBF2A56rzQ0doU/6OAim9z8dSUdag7OgUcF4gu8\r\nFgqqlK9ZexfXOcffizKyvnPVXm86WTNSfjhlzSAUpzpDiTKMTuVxlLgkqnQt\r\nk/Q32mTm2OFAU+lz9uFAvep+FL+GFtcLxIGfolK4jRFJFp361E64RniZPYDg\r\n2rQXuRQc3s7RfftJPOp4wyrRWR/kWfEWIrix1mm3F6Gqamf1vIDhoEQj3cnr\r\ntTUaBK076cTvH3S0Wk2lhN45rDbwSo2fZfd412Ih/WUvrr3m3j+8lIwPBKNc\r\nUqFQw14DFS9oAZN7xkpV+MReEqkpMOUJv0BI07FLJ0WjApXGMRZ1eema/p4Z\r\n/yQSMNGIWGycpHcbaE/D8CSjGWdUGwcz5R6gEPE1eSLWJP5MXFDmObJLib9H\r\nJ4mNgpI5FzirdTR3ioR0UwCdqxTdTl8hYIVdSjSvhjRfENEUhuNMOtHSWNlv\r\nDe2Lzwp974fRU4em5rvCDK0YTXaHmB/atzYMcmWqknA3LnptY9k4DLBZTw17\r\n61k7WX3ElQ8yeRmZ4jx4rOHVud06munhKP0=\r\n=C489\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.1.5_1682783546198_0.11733599485444945"},"_hasShrinkwrap":false},"2.2.0":{"name":"use-sync-v","version":"2.2.0","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"gitHead":"65b651ae8395af0be646ecb9d49a5df1b02bbefd","_id":"use-sync-v@2.2.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-jjRfYr/zQhgWlpQbVu6KlRDSej60Pk+3osmvjpo6u4v6iN06VKW6cTew2dw+QG1ju0L2NKSsOBXWV7jQ4XTXkg==","shasum":"8bfc333b1359b5e21848753a4d3e5d2f3c63c8b5","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.2.0.tgz","fileCount":23,"unpackedSize":24437,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjelTqzu3Mfo46Nnf1EgYN8JwJeIVAE+erP6VdvUiYmAiEA0uoyh6IhXKzZKUbbt/FkhyZfg1jiOCM3g7STAoIbhqQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTULCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJLQ//TUNId9nOnEeDBV46OQu3giZRUI6e1SrMEBK1rDu8ZC5Fj3KR\r\nPCoxXJGf/tmszaH4VQtWzyBXO/fZ4Jt3KpUUF4dRjUNTqgjRVV2pL+wupPrz\r\nm5eJZs/OXnJsHiT/h9PfUu6cwKR3BLh+CmZVQSgKmd3hqbpvTirOmZZvrv/c\r\n/dn4oJqzPE6blxLPylrfzJOW4kUkE9gwGtNMphds543BMmzmosCec8cJW+Z0\r\nef5VlMKJ42STy3z1Q8vRdFCqsRBPcy9Mc5wWC45Ec0+Pi4aUg9JxBkzX2UEF\r\nM9TcCmhT3mo4KZN48EHpH2iQDZV6CP9I40yH+AeGvTxh4xpkx6zY3rMw3hTO\r\nIuvcLSt0u8X+eavwNcsk4LykhmNo8hbsYFbMf1GDI3ubrKYjwPxT2JnCLgLL\r\nM0JdTIFw8z1qNoUeIp6oR98c4mKq6IUM+nxwCbwPMfAYxa6txuqE/vVU/e1q\r\n9wfsa1f/9Uxn2oOOfgQ4s3Wuek7nS7HFuLvLcLsBqUWFChI7vdgwsL5D4VPG\r\nEqK5V8X1oxhkAPTb/jIK4NWPVuNKghNnWl3P4Bg/fykGr15U+P9LveQK2iZl\r\nL/xv2JzZPjPXJyLS0DiHW/nQIO4JUbRZajNSksBEm+ia2xcclOmWNa/ROVxp\r\n5vivFhyq0TofNT9qREj8ZMKOzJv5gfmA91U=\r\n=1q+F\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.2.0_1682784962436_0.8981486718714247"},"_hasShrinkwrap":false},"2.2.1":{"name":"use-sync-v","version":"2.2.1","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"cc4d76208cee3068ec65354d7e17d59a25ab24f5","_id":"use-sync-v@2.2.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-FiM0w2xFidbwHJ+64TWwRcWTOt2gQocJcmmfnRAcRT3LZJdd+F5yPo3gdieL+JOFddMR5YJD12/LIU2ym0nk4w==","shasum":"5bacb6552ce01cf903e2df9ee52ba30084fed5c2","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.2.1.tgz","fileCount":23,"unpackedSize":24437,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCed/rjqh0ww8zfjfEIFCuWdRYSBErsB+EPQxtBam4bQIhALy5leYUTmf3slZzZd0evHgu/qHIOtVewLg6NSWzMnve"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTn3SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/ihAAg82kqtov/n3Vl4BqUemqrO6/VbPfK45r5R4OE06XQ2RYOxeR\r\nCIT6WA9rtMK0E0bGpp756Y5uF9vNJp/tCq51DuJWdvEW9TgP8csIG1Kjkwk3\r\n95o9pITQ9hW0D5ux7lzmeqwp5GGR8lfuZag99rCi6UzBlt+729sF3cuUjTPr\r\nsRNPve6mcVpo3jmbXtW4MFazQwRS0VGcEEUHID9LuY7YwTj27lCnyAOBt2kr\r\nP7cg8GaZ7BnMuv03VvDiLmW1dTyH0l0prIiNUvHN1lKIYyD38WzaW5amTAlj\r\nwl4/tJh/GC6lElJqSnxTqHCRHo6z+kiiWa4Pd3HMdmT9cBRLi2+hkNn2s6Rs\r\n0Sb9Rw9ltfcqAEo0sEdhTSnR6WscqAeltfbIUSW90qZoQoNtpIk78AvUPGcp\r\nDBiL9tPwACoe6wD+wYDviLcCX8K6dlzBx0oUoT7+K1jFw1c8q2iS6m4bqz19\r\nCxM4oIDQMkQf/2QXOqZt4rms520wUrS6qmeRzxn1qvuJIco6BDWVFbSsEPWg\r\nvakonMsMjHBWLkD3G9/pWIXVJE0pL6oOZfGNVMxpyqjGuLdII4nnKz4+V3pb\r\nY/wCqEXiZQNLJC4J0O977yorWOdM7n7CwLyA9g2CtldfmP4ZgAL/A//xaA/7\r\n/QmiQgwtqsdUwQyqWzu/5ZUDE0wHwqm51Kc=\r\n=zwRl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.2.1_1682865618434_0.9694624862905541"},"_hasShrinkwrap":false},"2.2.2":{"name":"use-sync-v","version":"2.2.2","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"9ea2918c705054983300c864dfbaf68bbdd677fc","_id":"use-sync-v@2.2.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-iorliXgeituugYgsop9WL/FRIxE6dkllwTBlrm9bHaWXpxr0aE39jwULwf0fVGRvhF4gmv3E0gWFtJhsoHchOw==","shasum":"537d91e2ffe4d80307f1c1db4dcb200f088733bd","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.2.2.tgz","fileCount":23,"unpackedSize":24655,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZd1Gn5ih2I1ueXioTONj4/fCwlPCZkDanFVwB4awrDQIgKT0MjmArVMmxVVIvWjDOCyQ1C+XovZFGRvXtxXxTlnM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTn4gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmplaA//YQH37MH+3ZT5iA4t6etTtVmeqG+fV4jteXZ/o1xDulUNLln0\r\n3U20Y7wgo63G9S6YEGLIOQ8QoAyzK1sUwRSmRMe7DcKUdtgdZAvuZ0LRdXm9\r\nKvC45blj6Nneywx47lI+0FRZiklntBX7TxzFX/MvstQUqerAG1O0MnO+KlDS\r\nIOpXsbJktyxSQbDZxRFOaZFFUwz3OIZWNsT92F4lUq4WB/dUFxQII6uz3v8c\r\nLTH0ygkhhTk2KwgBC6o8S6oJCKe46Jvs81V6tmkoSDQdoIDGKk4TItoZmU+4\r\nqCq0E+OyC2xgpxgtAU771CDDz14KSMbuaaCIAas/rIIQfutAjw3IJBOa/ygb\r\n+7TeUaw9QA7jhKFr+MfU8SKWWWW/6znKRMw3Zus46Z4dGnC1MxdlOg/vdBKZ\r\nIFUgkjXOaGrC29a4UKhPzKZapMVd6Kz7Tz90F1i+FaITzsIcQAaZ0/5owSlu\r\nC6J8SokD355SFTh+NNUoy8miseCo3mJE3fLD3zWZRfO2a75MrWNfsXcF2LB5\r\n/WfgWKzSi+Z+rJI1fY3ha6QcW5ay/Xoj6s9Ql4tsTsXP3tYFk9IDJODbMbZG\r\nib6mm1ccB8sMmmlmexn+Op5T+HoaoQ8bkxYwnnIDGB8BK9dUsM5AMqKx69q/\r\ntAP2tfWPy1hb6dWQQxpoVsSQ9ofzVStu/Wk=\r\n=NyE3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.2.2_1682865696627_0.03286233990258558"},"_hasShrinkwrap":false},"2.2.3-0":{"name":"use-sync-v","version":"2.2.3-0","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"b6a178cdd9c3a1933fb1688141cc45f24c4b5e3b","_id":"use-sync-v@2.2.3-0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-VZKj3pSfzGgcEh0m697KaNNKppF3t8LO5ax8qyYdWViG6uTJX5Xr7V2zPSSIwQet7CDGDFtmEE3oSRRKpExULw==","shasum":"902197459d2c0fcfbfb0540ae4f939959a47cdc7","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.2.3-0.tgz","fileCount":23,"unpackedSize":24670,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHYxUx2t059bum2KDn5PQWBBUmaFR7F8pqBc7Jm7H+rsAiBkbKCIZ+Zx7woSvsDMxDa1gx8hwoyiU6o4SoWL6hWX2Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTyINACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMaw//fM/VhxGQUdHY2E6tkvzz/5ukWMqC1QIRgv4v0xkLla3TJpik\r\nugXrx8/EhnZ7J2u915LwX5aGuyVlMdBxq9uEoiDqU+ug4AUlJlzTMkfCy/Tm\r\nFjdznDLqi7flt8mPi62xqxdeXSyaeWPSUeICo6MDAB80m4SMwJCbG6DPKztb\r\nxs05I+Q20+qM0OKpoBBjAIxutu5o8Iry0RV6ifxpmmA1SYnAwwzxXU3AT50J\r\nKa2YTWHXjHSYHapXCinVBkW9r4TJK599iik16OluLGbyauhKRruNBFSXqxoq\r\n8WXE8TSBeH/jYnIBSzHXMnIL3/3PSHCwa5cOFKk0FAr8wUaVqtzo27TNYNJ+\r\n5FpsKbzsJsxH74qaySv9B3s7In4fiboAsl3Ve8O5q6u9MTwdd/KOZLKi7+P1\r\nkU0IKZLLPRf2S6xEIArPCrxw6GcnxPtWrD/Ckfp/GD19zw2NInVHvOs+m44V\r\n8ion9ww4uWMJLRHlDAdPFIBx4SEuqAgf8Ebukuvw9n2k35m6K5MmjMVncwB4\r\nwGTXUHW3/Jmg2QOMy2rbq1yCOGDWXUiw/k3g+8TsSrlbF3LuN6kzKfjs8BW2\r\n7gm2IB1QXgURhryycmZsfn8j0rXF3iK8j/ZdWSzEWdnZrbWqwJchCyfATpfO\r\n+hYR5mQWqdvO6NqkgG+iSpvMI8Cx/kQ0vKA=\r\n=oKxO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.2.3-0_1682907661393_0.7969708915552187"},"_hasShrinkwrap":false},"2.4.0":{"name":"use-sync-v","version":"2.4.0","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"b6102865c7b411645e75c84e18deddad8dbddf72","_id":"use-sync-v@2.4.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-RvMgxO8HENbXhXEei/m3KWmIM6FAn9k2uKzlQhVGE7nCLFGCD0BUzckZGdFhjAyNMP4RFw9/7zmagrYSEeLf/A==","shasum":"2a3b8470e3004bc90fa7689755168ba01880045e","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.4.0.tgz","fileCount":23,"unpackedSize":24655,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5UExj7tdqUh+w3D5zoQon09hCGYBf/1M+fT+D4W1y7wIhAOdMJFARC8mKVeNMEYj8ftplxvXXtpEZLf4bB6gug5Ek"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkUz5TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1URAAlsthtqiCfLd2mwRiJTsXyDV6pTczQbGtIFt3KEkybs06DNbu\r\nyaDjPekyk7/1tUA3DWwZsAioEEs6R794kSxMNlyEXD/WPaqNfKxJ8Xuuz2mE\r\nGrcaQCjF/ffXPygIPaVj1RSkqBHZ6bNxLiem0WYMujquBW3hyTiKg/M/HzCg\r\nUfotmCrwhRAB8wGxe7YdOl6pbBgJLOEf4iew+HJAG/8j2z3zheTVjkDVH1St\r\nSSTd9RrY5KK6+1MgxsIO5aS1xdjV0w0L8/MkL2k5d6FyYo7X/+gIiyQWnhmD\r\nw4bWFIL9ldWv3MRDIX1iDV24Tm7P/CeImUNa0aXuOyYF2vwXPsjJWEyQPuyF\r\nar1auKTCt6wvLgousBmEp//vDijOZ7ED+ERvFC/n46QKhYGe2GrcS/k2wZSu\r\nj3OyFNpjjP+8hqlYFD8v4NnkbQumfos34A8pqLSfdWL4duVGX3+Aa9ixprzq\r\nGQYZyXWEe6HSRWd/T5LChyWvx76mPSzx8NoQYoTWwQVu5gbfoIDPl2tC8RzX\r\n7mMnyfd5M4DInu6J9fjJcKwDm8SehBSOW7RGLZqLQ/lgkToXRgrukm0Je+6I\r\nzlGzm2S2c2px5BqVUC4pbCOheGG2T8f0oHa9noMNhzVcolSVtc3Rk1pq2SxB\r\n4NVyHP84LHosqHCGwb1KL/lGI50FodVOjtE=\r\n=bv1T\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.4.0_1683177043436_0.6622445019892731"},"_hasShrinkwrap":false},"2.4.1":{"name":"use-sync-v","version":"2.4.1","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"49f134ac51e77e530c09baab9c414165b5a3ce09","_id":"use-sync-v@2.4.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-bTYTDZNUsRzJnsjHSBIa+FRwlGgBrqBmAMvQNf3u+KGbTp3iwD+knR9wzZnfsJfA1BnKqsvkH+h+HpzRqRq8yw==","shasum":"2b6bc860081f762005623cfccf38a15cd6a4de03","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.4.1.tgz","fileCount":23,"unpackedSize":24934,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJ1ShFRB3JCdBP9As1YCQeuE0p3pMK2oYpi4QmSuwtjAiEAkAi8LUvaM5ML5ZIGQrbSsfCK2EhBsyEi3k7ys28hy2U="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU0eIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmostg/8CCc81kF263+I/YPKtVH0qz36HHWLIGOGX4Vj2vC+BcGLQXzH\r\nlriIhUZy5V7GCzk+Nz+TCCgIRdxbHir38corABg3P4blJMJSOqxMZMfkHSJQ\r\n7L+SDP/l6QDgtF6LMZQASAWZTM2O70djXg/7q4OGFyQF1nrEqYIqWHMfNflF\r\ngg4ZIYv7z37+Z5lTU0UqUlECSXIoJh672csUJ/wV8wzxGjEwmau3323+uVNi\r\nmrWpccbBOfKUeareUkib6Y/+/j1PFqW40WJJdFsiStrV6t+V11gTGjx9qTiv\r\njsv8Xs7RLMpuFrkE1RULpmTLlPUxMr4QmgQ+OZvjY1dZ7GfOdMkfkb6EHPrJ\r\nIcFRKip1CMuKzid5JhfBUtTHM0Vk+kAkGYLTu9YJ17alwgEdzg1aj+TnHoEw\r\nukz7z07tHvfxERvM9+TcvGwXul0TJWKvCx1+4YtR7NkMilezZqGbkvaTdPZv\r\nD5I8J1yPEbsC83Ntgc6Rhk8qzfGvagRHBJ0crnuTMBwmf8VgozrUZ5AkoKgU\r\ngQmWQdvQ6EtvLT6DSb1naWhhh8sUaO3DOaV95MLAYrFT8Fb4LFn7zYzvBEKr\r\nFxuLkZkSbg7ndZGrgF8QwEANMOhy2z82Ari9Z71XM2+GnWQ4y6DCxNjAaQre\r\nC5c7TfE6ZIUBfBDMSShIiOOA7wOnccxnV04=\r\n=x9uh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.4.1_1683179400161_0.06685007118227504"},"_hasShrinkwrap":false},"2.5.0":{"name":"use-sync-v","version":"2.5.0","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na simplistic CRUD global state management for react with a built in async fetching\n\n- no boilercode to start with, use it out of the box\n- CREATE, READ, UPDATE and DELETE\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nupdateSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nupdateSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nupdateSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nupdateSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\nreadSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n\n  useEffect(() => {\n    updateAsyncV('api', fetchRandomUser);\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { updateSyncV } from 'use-sync-v';\n\nupdateSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    updateSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    updateSyncV('counter', 0);\n  };\n}\n\nexport const initStores = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initStores } from '@/lib/store';\n\ninitStores();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\nreadSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nupdateSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nupdateAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n","readmeFilename":"README.md","gitHead":"60206ac2c111068004c455f3a22b34e8e9319af2","_id":"use-sync-v@2.5.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-SM/XAFDlsj89pD7Vb645QsCt1iOovgDCHkK2MWmd3NaTHv4uQlfAEXvy6k4+IPcITmP8zkqIrXIoHP2LY26Xxw==","shasum":"e6dbf828f81debffcd6842281db087bb64aecfa0","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.5.0.tgz","fileCount":42,"unpackedSize":43577,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHPbZq36AYvfKKFARrAMSEni+C3hCdml2Cq8PjQ47bqaAiAzHksEE4KgXwvBtOglayMD0X/+mGSrJ4QTVb271h08Dw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU3Q/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqfZxAAn6H3jrjjWd48qJ7O7HBacV3qluAJb0nyaZ4RQfVYC2l4U+n7\r\n7CJmypYXcXnJ+FbtMChF6f0kSekhZPq819Q56YdspJJ0c5P2ctGDOZZcK+VM\r\nUOl2op0x3aA2AiZS+2G0WrnDYb4Y2QmpU1k825YRVeB8fcWmOekA3Hj6Hju2\r\nzUOYIfKGPoMUfOc/BriITOHUVIz/fvT263P/fdoofLWjC7ZCHaoQQn6H10za\r\nhjINxnpiPa/VpTuQ5PlLDb9WlK4zfRg+ThCVQGJ6AirsrtdUire1L1eiVgbM\r\nNDITUzbktIRw0OArWhT0ZWVLOVPRWiogI/9oKQmko6sT80nd8kGNkS2P2Zml\r\nO2Pwq6oDHl5I+wiZZqUQDZmhKODeeVJfWWtMLOZHweVljGlKbeOitwGxP6/S\r\n640yWIQGMmyi8rQj8Ar01/FZxLrZSoGnQnGBHxGMOCruHS2gC0v5t6Y2/Rii\r\nkPDayLIzJWf/m7jkkbxzAlQIEWBUfzxBGyzKYRTRetS10y9yBE5PoaBOFy/f\r\nRNVGeh/+LDr4FJGXvjqLLY+XIbdgZEIgf5UmDqjdpLZUpzn0ntcYEOvta3Uf\r\n93pWsue6lTGz3j6nuXe+JGwUkrxcGlshjU2KpDz6ix9BjTdYOnekBO5T0eZG\r\nCaK53G5y0JtjTPDRk5n2dyr4rBkMLfBrzeQ=\r\n=W3rO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.5.0_1683190846980_0.9510450717397814"},"_hasShrinkwrap":false},"2.5.1":{"name":"use-sync-v","version":"2.5.1","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na getter, setter and subscription to react global state\n\n- no boilercode to start with, use it out of the box\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nsetSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nsetSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nsetSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nsetSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\ngetSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n  // this will subscribe the component to 'api' store/ state\n\n  useEffect(() => {\n    setAsyncV('api', fetchRandomUser);\n    // this will fetch random user data\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\nBy default, setAsyncV will return stored value as promise\nBy default, setAsyncV will put 10 seconds setTimeout on error, if error happens. So we don't need to delete error message manually. (configurable in config)\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\nBy default useQueryV will set the initial loading value to true\nBy default useQueryV will cache data, so if there's any existing data, it won't do refetch\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { setSyncV } from 'use-sync-v';\n\nsetSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    setSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    setSyncV('counter', 0);\n  };\n}\n\nexport const initSyncV = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initSyncV } from '@/lib/store';\n\ninitSyncV();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\ngetSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nsetSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nsetAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n\nfor more explanation: look at the code snippet\n","readmeFilename":"README.md","gitHead":"8958020cff690024762728cbe9c3877e7c986a8a","_id":"use-sync-v@2.5.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-DakslOni82eunwYz2ENP6eKTr/51wA+DuY2MnPqAs2L6xnG1/BOfeVQsfPA/ABus/qh/ZhisY4KUBybB0A1rTw==","shasum":"73e1dac05fc0ce408957148f0b83e80763206c5b","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.5.1.tgz","fileCount":42,"unpackedSize":44171,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHmOwCBlGDTCxhDCN5G6DbjKsbsWdKKCwVvB5sCVids1AiAWU2JqpJ/S+m2Xy/vvmkRcW8QLan3VOrKMkviJH1a8Fg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU3wAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvohAAnFoZX1DPPvTbE5zn04RCf7MeWnbX996lbpw7UJo8ie5g0FBc\r\nwd9W0RlmiJzr+fQSG1e3wMCyNlHGMRqenCqNUNg6bP9BCzoWwMX7jm9UXieG\r\nwltwivv1ATP/btvzkBN/4D/VqJTRGiey3wHFECaBZvyHvNGFw4t7ic77Wudi\r\narbLGVTsD4PN+slSfQNDvOjlIA1siseNBZnHyXFu0n31yRy6+9IBZUCmD2bs\r\nFYrfPkMH2Z/NujDavir8RbRkRx8tuCgxNK3hiADxFSj0UpFCEykOJxo+kN/w\r\neojAjGpE/OYz5p9YCio7PMG+n2L6VvowDHIWxDvLmAcvFH0vHRuyebkntzu4\r\nMCsWXn94UBeFeWHqYM71Zl7LLMa8op7T4dyRWvDCFoWwEnpHzi7mFwyKufXB\r\n+qGs+AV8J6lqExn3kh7Yh9Isyic9jxRv8hV6xeHy0VYAUABd/EW4anzfN1X+\r\nwhnjtbmbIwfVBTJvuW5Ev7yYuID50BOBCzlrVsqNZctnEGtzZUyTyUXZKjTt\r\n44bbWD1P4IjnaIHctL2/lSV8GmFSb1/A0hBpiKtsXvK1JKiGrCQ5pvlJkoec\r\nRcKm6m4JJSXfAB1FWRaScRKlXPIRC3m/6Q2VcDm2UbjKP9rmAqw2BYnmjWjo\r\nx8fkMCG1XOpall6Kkp/1LQPb/YWkLGHNOro=\r\n=8Lyz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.5.1_1683192832148_0.3103420846158542"},"_hasShrinkwrap":false},"2.5.2":{"name":"use-sync-v","version":"2.5.2","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na getter, setter and subscription to react global state\n\n- no boilercode to start with, use it out of the box\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nsetSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nsetSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nsetSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nsetSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\ngetSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n  // this will subscribe the component to 'api' store/ state\n\n  useEffect(() => {\n    setAsyncV('api', fetchRandomUser);\n    // this will fetch random user data\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\nBy default, setAsyncV will return stored value as promise\nBy default, setAsyncV will put 10 seconds setTimeout on error, if error happens. So we don't need to delete error message manually. (configurable in config)\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\nBy default useQueryV will set the initial loading value to true\nBy default useQueryV will cache data, so if there's any existing data, it won't do refetch\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { setSyncV } from 'use-sync-v';\n\nsetSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    setSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    setSyncV('counter', 0);\n  };\n}\n\nexport const initSyncV = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initSyncV } from '@/lib/store';\n\ninitSyncV();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\ngetSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nsetSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nsetAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n\nfor more explanation: look at the code snippet\n","readmeFilename":"README.md","gitHead":"ab06ca5ad49fbe7de7404a4758da682282af493a","_id":"use-sync-v@2.5.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-PO3DsU0wdrFFGxeV1O0AupW3rV1G11rd9Po3Cn6gpmKccIg+24w7y7tk0TRt7i8a+U4Pg2+spjyhA7pj8tqNgg==","shasum":"2d0299cbadc91e6ecbbd813f52bc6eaa12499abe","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.5.2.tgz","fileCount":42,"unpackedSize":44580,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCd9ji0A1gegyQeJ5CHRMzkIieHaoWxk30vM3u1Ao8Z7QIhAOPQNaJ67T60EiXjE31nnu0tq8lcLMkvyCdahYZjjHS2"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU30IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpa3w/+N5LKFhLQBRTKFFHQteshu+89raUD2/x5p7nfAubcTChRnIvG\r\n+PGkuSbQ+WOyDLMh04XYxYGQySwJOiEPgjP10JhynfquYWafk1yT7FJEWx8b\r\nmTNkOaiR6vq2EuuQ40S91jCYB8ozq6yx3ms5m0LI3xL1K5vTDTOyhfCht1l5\r\nqvrfMBAep9R2JhmYX4/cLrpXjuAuf04BTGtCgIRLBGR/6D7SvZXY47nAHvdE\r\nSROHSThOEpUnOZV7sa7duFqg6G6tiJhAaLpU9avwFtTmB8x21mvhyprZitXx\r\nrTty5vYSQ412k8by7Ynt4SxucU+V1yQOZHpXJmJb69SUkvkMOMMgm9McMi8w\r\nwQwNACFs6JUwtU93F2ed/zPl75sQ0x5EDxpKI0RzyWMkoF+4UluBD5vb6nBw\r\nxipjIMbA5EAmoAT6AGwiDm0sfWHbsBZk5Gw6QZ15dmJ4tVS8NwukGflM1ewi\r\niui0MSpu6dedvUxxqfQ0DQJuj1t5nYq78heG89irwRYZ0AZxgjKuZXQDbAWv\r\nD+rf0uVcfConQ/l5iEZ8nfAWaG/hOMaCeOB7YQzGtQwv1RP8jNkTawuvhn4w\r\n+o4VmNlJ1eNCCWyh+3qL1MuoLhUd7tyVtQ6MCh3OaUGopM5knHF8zEQzCfOI\r\nBDe/38FYSlUSnE8xramKNG6yVM/ZivYZN+k=\r\n=PLCx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.5.2_1683193096687_0.9954258550634296"},"_hasShrinkwrap":false},"2.5.3":{"name":"use-sync-v","version":"2.5.3","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na getter, setter and subscription to react global state\n\n- no boilercode to start with, use it out of the box\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nsetSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nsetSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nsetSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nsetSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\ngetSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n  // this will subscribe the component to 'api' store/ state\n\n  useEffect(() => {\n    setAsyncV('api', fetchRandomUser);\n    // this will fetch random user data\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\nBy default, setAsyncV will return stored value as promise\nBy default, setAsyncV will put 10 seconds setTimeout on error, if error happens. So we don't need to delete error message manually. (configurable in config)\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\nBy default useQueryV will set the initial loading value to true\nBy default useQueryV will cache data, so if there's any existing data, it won't do refetch\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { setSyncV } from 'use-sync-v';\n\nsetSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    setSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    setSyncV('counter', 0);\n  };\n}\n\nexport const initSyncV = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initSyncV } from '@/lib/store';\n\ninitSyncV();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\ngetSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nsetSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nsetAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n\nfor more explanation: look at the code snippet\n","readmeFilename":"README.md","gitHead":"f24a0e10c7c60748df4619b22e706b1f28351c73","_id":"use-sync-v@2.5.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-SsMnZqPzgwA0VJUahnS+OO+PkWgVhXCxTOSJ07Ib4/AovO23ds6h/hoWiict5K9ZIT4AysYTuWVJuupsmhCTDw==","shasum":"f033078a86bb5416b931663e24273a10023736b4","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.5.3.tgz","fileCount":42,"unpackedSize":44376,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEq5B4+cwNGhwsFUf7LhP/V3zXBh68SsI4/hnQ/JA2TgAiEA4ZVBiiExVPlvZQfqFeEb5NVCEmI0BNCQ2MpPr0pBJK8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU4foACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBaA/+NHOqpxK+7wHw2F0oavYxsvQAlB27jXHbGIgrVWMkSR50MKFQ\r\nZ6BbfrbvUXMxC78uy8UnihSzESuSWSljiPzZESgq//ZHefMzAlXvEaAyNKkh\r\ndl8LxuOKm5U3Tafcq3Xp67PkjsNgGaguSwZqEvYk7lVvvhqzGRNhWk4lAqOe\r\nsG0muf5V1JXnzyT7oePELE2EuT9NoZqpIuL4tWunkXQ6gpt/8LCuzGeuyrDY\r\nMCzZa55tEw9PZW9bVCqanixEYE2JNpFChE3W1i4NDeudOzhyql4AnII+atWe\r\nfO7/0CTOsaZyFbcnkxdJUQdKY4HjnRa20DlLhNhc+P5grocCCVm7Inaodt0d\r\n351uVjeWzU03jFMrVl+AkJL8E8AZI60EB2MuqXEuVBFZsWPdoIwgiobAp6s4\r\nuzXExF5fbNIjHpVovvGNBVKF0ytA0CRIx5aFMNvSH19OStjPYCx0hQ7J+AkQ\r\nxDkGHDrhOfmDsyk4ghIZ9YfGJ40sRNoj/dRcanpf9qG6yHJvcj1Z/Wso4r+Z\r\nCcSR6G39mUPh/bLWR8/iSW0URnc/gBRV1iGam1zDDUmSWh9kjyPvDYQo/yR6\r\nANEGshpFhBmLWnpldCAJkB5EgoIuzeFDNHbBblxRT/wgLoDXp4b4G9DqZPvg\r\ni3gzhEgYXw3OBFjU6Gbrhg+JM3zS4OuKTJo=\r\n=1ewX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.5.3_1683195880427_0.08452013702062855"},"_hasShrinkwrap":false},"2.5.4":{"name":"use-sync-v","version":"2.5.4","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"gitHead":"d3fa432c73a27caa1a888bb374164594d6d320d6","_id":"use-sync-v@2.5.4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-nvnlTaB9IP//4eiBEKwS0syhA9IIL2Rw05mNJ7FyUTTEFxUUkEnU3dI+fbShmQylp8z+agW5raTqmejnliLmWw==","shasum":"86f360f75fb79ab548243956d33bd7325ce00004","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-2.5.4.tgz","fileCount":42,"unpackedSize":40825,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGN03GJw3FzfADALfhM6/zBrS00IHrALD3R9td1XUdfFAiEA272RUTSbfHwd+cqkhZPIE6tGsj1O0uG9XLeP5U56Xws="}]},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_2.5.4_1683709011040_0.9427708617513757"},"_hasShrinkwrap":false},"3.0.0":{"name":"use-sync-v","version":"3.0.0","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\na getter, setter and subscription to react global state\n\n- no boilercode to start with, use it out of the box\n- structure the store / state how you want it, it's behaving like JS object\n- efficient rendering by utilizing selector\n- extendable if you like to use reducer, write a reducer just like how you write vanilla JS IIFE or static class\n- built in fetch with cache, and return synced \\{data, loading, error\\} for your UI\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage\n\n### To store and update data\n\n```jsx\nsetSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nsetSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nsetSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nsetSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\ngetSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### Fetching data:\n\nLet's say we want to fetch data from api and store it in \"api\" state\n\n```jsx\nconst fetchRandomUser = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useAsyncV('api');\n  // this will subscribe the component to 'api' store/ state\n\n  useEffect(() => {\n    setAsyncV('api', fetchRandomUser);\n    // this will fetch random user data\n  }, []);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\nBy default, setAsyncV will return stored value as promise\nBy default, setAsyncV will put 10 seconds setTimeout on error, if error happens. So we don't need to delete error message manually. (configurable in config)\n\nFor async data, where we want to track loading, and error state, we use updateAsyncV and useAsyncV\nWe can simplify it further by using useQueryV, it's a wrapper for useAsyncV and updateAsyncV\n```jsx\nexport const DataDisplayComponent = () => {\n  const { data, loading, error } = useQueryV('api', fetchRandomUser);\n\n  return (\n    <div>\n      {data && <div>{data}</div>}\n      {loading && <div>Loading...</div>}\n      {error && <div>Error fetching data...</div>}\n    </div>\n  );\n};\n```\nBy default useQueryV will set the initial loading value to true\nBy default useQueryV will cache data, so if there's any existing data, it won't do refetch\n\n### To organize the store in a different file and have a reducer\n\nin your stores directory\n\n```jsx\n// @/lib/store.index.js\n\nimport { setSyncV } from 'use-sync-v';\n\nsetSyncV('counter', 0);\n\n// for the reducer\nexport class CounterReducer {\n  static increment = () => {\n    setSyncV('counter', (p) => p + 1);\n  };\n  static reset = () => {\n    setSyncV('counter', 0);\n  };\n}\n\nexport const initSyncV = () => {};\n```\n\nand call the file in the root of your react app\n\n```jsx\n// _App.js\n\nimport { initSyncV } from '@/lib/store';\n\ninitSyncV();\nexport default function App({ Component, pageProps }) {\n  return <Component {...pageProps} />;\n}\n```\n\nand call the reducer anywhere\n\n```jsx\nexport const CounterComponent = () => {\n  const counter = useSyncV('counter');\n  return (\n    <>\n      <div>{counter}</div>\n      <button onClick={() => CounterReducer.increment()}>increment</button>\n      <button onClick={() => CounterReducer.reset()}>reset</button>\n    </>\n  );\n};\n```\n\n### To recap:\n\n```jsx\ngetSyncV(selector:string)\n// to read value of the state selector at the time the function is called\n\nsetSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n\nuseAsyncV(selector:string, asyncFn:function, config?:obj)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nsetAsyncV(selector:string, asyncFn:function, config?:obj)\n// to fetch a data from api, save the results into the store\n\nuseQueryV(selector:string, asyncFn:function, config?:obj)\n// this is a bundle of useAsyncV and updateAsyncV\n// to fetch a data from api, save the results into the store, and subscribe to it\n// by default the result is cached in js variable\n```\n\nfor more explanation: look at the code snippet\n","readmeFilename":"README.md","gitHead":"64f5ca8205a2ebb0a5f1774291e9236e354dabdd","_id":"use-sync-v@3.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-st7PPwclxm3JVMrnh7KaCo1Z4gTi+Q37ehR+fiYujR+E/R8vQaBrIFx76uPzENpFFqGgCwoEIzQJHgaHErzjYA==","shasum":"019ec4f6b6f4c5c50846ff6d40362d8895959952","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-3.0.0.tgz","fileCount":57,"unpackedSize":50931,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFA9HQpOIBpIhB7+83c0YAlUsKMgFACnJvzXx8H7/ND1AiAgnwufAR3SYiYlfswiXXtx44gSR2guXP11XKIeZd5fWQ=="}]},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_3.0.0_1683996895923_0.2561696745802742"},"_hasShrinkwrap":false},"3.0.1":{"name":"use-sync-v","version":"3.0.1","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\nbreaking change on v3\n\nWhy use sync v ?\n\n- in front all we want is to get synced data from backend\n  - recreating database in front end in a global state is tedious\n  - just subscribe to the data that we need, that we can access anywhere in front end\n- opinionated\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage Example\n\n### To subscribe data from backend for backend without built in subscription\n\n- You want to have a global store that fetch data from backend\n- everytime you modify the backend data, useAsyncSubV will refetch the data for you\n- we use stale data while refetching by default\n- loading and data state can both be true at the same time\n- when the component is dismounted, all fetched data will be erased\n\n```jsx\nconst asyncFn = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const UseAsyncSubVTest = () => {\n  // this will subscribe this component to 'randomUser', whenever we do setAsyncFn with 'randomUser' as selector, the data will refetch\n  const { data, loading, error } = useAsyncSubV('randomUser', asyncFn);\n\n  const refetchHandler = async () => {\n    // we want to modify backend data\n    asyncRefetchV('randomUser', async (p) => {\n      // we can set the data here for optimistic rendering (optional)\n      setSyncV('randomUser', someDataForOptimisticRendering);\n\n      // we can put function here to post / modify data in backend database\n      await insertDataToRandomUserTable();\n\n      // useAsyncSubV will automatically refetch data\n    });\n  };\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n\n// let's say we have another component that we want to use the data from 'randomUser'\nexport const AnotherComponent = () => {\n  // access data from 'randomUser' earlier\n  const { data, loading, error } = useAsyncV('randomUser');\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n```\n### To subscribe data from backend for backend with built in subscription\n\n```jsx\nexport const AsyncSubTest = () => {\n  const {data, loading, error} = useAsyncV('random')\n\n  useEffect(()=>{\n    // set up subscription \n    // then modify state data with \n    setAsyncV('random', dataReturnedFromSubscription)\n    // this way, everytime there's a new data sent from backend, it will automatically stored to 'random' state\n  },[])\n}\n```\n### To have a global state, like redux, zustand etc\n\n```jsx\nsetSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nsetSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nsetSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nsetSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\ngetSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### To recap:\n\n#### For sync global state\n\n```jsx\nsetSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n```\n\n#### For async global state\n- with backend without built in subscription\n```jsx\nuseAsyncSubV(selector:string, asyncFn:function, config?:obj)\n// to subscribe to backend\n\nuseAsyncV(selector:string, config?:object)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nasyncRefetchV(selector:string, asyncFn:function, config?:object)\n// to fetch a data from api, save the results into the store\n\n```\n- with backend with built in subscription like Firestore\n```jsx\nuseAsyncV(selector:string)\n// to listen to asyncData\n\nsetAsyncV(selector:string, asyncFn:function, config?:object)\n//\n```\nfor more explanation: look at the code snippet\n","readmeFilename":"README.md","gitHead":"3bb96501d6132184220ea8b5e326ffa2a03ef433","_id":"use-sync-v@3.0.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-30pQJqsrRZj5nfWsyNilNC3iF2Jl0oAmIoq8wfQYB+hSuXou6jGuscJph+CEAwGfW7XMOZS2NJfyU8Unxekogw==","shasum":"4623f8cd07480c7e584fa604b34c9530cdb62cd7","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-3.0.1.tgz","fileCount":87,"unpackedSize":72749,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDn6o4DwYggt5qxRU4k82UcTPbiy+oK4BS4cl1rYFyhvQIgJZjJm/Q/d/x71QZ4R5AW8hiT1jvpNoA3tueRjUIBGhM="}]},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_3.0.1_1684051102282_0.47502671823455445"},"_hasShrinkwrap":false},"3.0.2":{"name":"use-sync-v","version":"3.0.2","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\nbreaking change on v3\n\nWhy use sync v ?\n\n- in front all we want is to get synced data from backend\n  - recreating database in front end in a global state is tedious\n  - just subscribe to the data that we need, that we can access anywhere in front end\n- opinionated\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage Example\n\n### To subscribe data from backend for backend without built in subscription\n\n- You want to have a global store that fetch data from backend\n- everytime you modify the backend data, useAsyncSubV will refetch the data for you\n- we use stale data while refetching by default\n- loading and data state can both be true at the same time\n- when the component is dismounted, all fetched data will be erased\n\n```jsx\nconst asyncFn = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const UseAsyncSubVTest = () => {\n  // this will subscribe this component to 'randomUser', whenever we do setAsyncFn with 'randomUser' as selector, the data will refetch\n  const { data, loading, error } = useAsyncSubV('randomUser', asyncFn);\n\n  const refetchHandler = async () => {\n    // we want to modify backend data\n    asyncRefetchV('randomUser', async (p) => {\n      // we can set the data here for optimistic rendering (optional)\n      setSyncV('randomUser', someDataForOptimisticRendering);\n\n      // we can put function here to post / modify data in backend database\n      await insertDataToRandomUserTable();\n\n      // useAsyncSubV will automatically refetch data\n    });\n  };\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n\n// let's say we have another component that we want to use the data from 'randomUser'\nexport const AnotherComponent = () => {\n  // access data from 'randomUser' earlier\n  const { data, loading, error } = useAsyncV('randomUser');\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n```\n### To subscribe data from backend for backend with built in subscription\n\n```jsx\nexport const AsyncSubTest = () => {\n  const {data, loading, error} = useAsyncV('random')\n\n  useEffect(()=>{\n    // set up subscription \n    // then modify state data with \n    setAsyncV('random', dataReturnedFromSubscription)\n    // this way, everytime there's a new data sent from backend, it will automatically stored to 'random' state\n  },[])\n}\n```\n### To have a global state, like redux, zustand etc\n\n```jsx\nsetSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nsetSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nsetSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nsetSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\ngetSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### To recap:\n\n#### For sync global state\n\n```jsx\nsetSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n```\n\n#### For async global state\n- with backend without built in subscription\n```jsx\nuseAsyncSubV(selector:string, asyncFn:function, config?:obj)\n// to subscribe to backend\n\nuseAsyncV(selector:string, config?:object)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nasyncRefetchV(selector:string, asyncFn:function, config?:object)\n// to fetch a data from api, save the results into the store\n\n```\n- with backend with built in subscription like Firestore\n```jsx\nuseAsyncV(selector:string)\n// to listen to asyncData\n\nsetAsyncV(selector:string, asyncFn:function, config?:object)\n//\n```\nfor more explanation: look at the code snippet\n","readmeFilename":"README.md","gitHead":"5655766209b88f558dfc954e85a79225185c090e","_id":"use-sync-v@3.0.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-zjYhll5G1BWlnVFEeEbQX67T1xUAik0ETSsBs3YO3R+IJebJ4mt2LcuVkqyP8sTsYluV6KN1+HgrQ9sSQesb6Q==","shasum":"5f2c238d0da219f4f8322eaddd5049000106415e","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-3.0.2.tgz","fileCount":87,"unpackedSize":72759,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCACGRCmyzHBx+3uePn3aiKFIbJthMsJ4J+flVRL86wwQIgTaR93zK/WJZ3Aj3r9qBFDbPGIgQsVFScQkj9VUYEFjU="}]},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_3.0.2_1684059155991_0.8438191892456544"},"_hasShrinkwrap":false},"3.0.3":{"name":"use-sync-v","version":"3.0.3","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\nbreaking change on v3\n\nWhy use sync v ?\n\n- in front all we want is to get synced data from backend\n  - recreating database in front end in a global state is tedious\n  - just subscribe to the data that we need, that we can access anywhere in front end\n- opinionated\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage Example\n\n### To subscribe data from backend for backend without built in subscription\n\n- You want to have a global store that fetch data from backend\n- everytime you modify the backend data, useAsyncSubV will refetch the data for you\n- we use stale data while refetching by default\n- loading and data state can both be true at the same time\n- when the component is dismounted, all fetched data will be erased\n\n```jsx\nconst asyncFn = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const UseAsyncSubVTest = () => {\n  // this will subscribe this component to 'randomUser', whenever we do setAsyncFn with 'randomUser' as selector, the data will refetch\n  const { data, loading, error } = useAsyncSubV('randomUser', asyncFn);\n\n  const refetchHandler = async () => {\n    // we want to modify backend data\n    asyncRefetchV('randomUser', async (p) => {\n      // we can set the data here for optimistic rendering (optional)\n      setSyncV('randomUser', someDataForOptimisticRendering);\n\n      // we can put function here to post / modify data in backend database\n      await insertDataToRandomUserTable();\n\n      // useAsyncSubV will automatically refetch data\n    });\n  };\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n\n// let's say we have another component that we want to use the data from 'randomUser'\nexport const AnotherComponent = () => {\n  // access data from 'randomUser' earlier\n  const { data, loading, error } = useAsyncV('randomUser');\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n```\n### To subscribe data from backend for backend with built in subscription\n\n```jsx\nexport const AsyncSubTest = () => {\n  const {data, loading, error} = useAsyncV('random')\n\n  useEffect(()=>{\n    // set up subscription \n    // then modify state data with \n    setAsyncV('random', dataReturnedFromSubscription)\n    // this way, everytime there's a new data sent from backend, it will automatically stored to 'random' state\n  },[])\n}\n```\n### To have a global state, like redux, zustand etc\n\n```jsx\nsetSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nsetSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nsetSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nsetSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\ngetSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### To recap:\n\n#### For sync global state\n\n```jsx\nsetSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n```\n\n#### For async global state\n- with backend without built in subscription\n```jsx\nuseAsyncSubV(selector:string, asyncFn:function, config?:obj)\n// to subscribe to backend\n\nuseAsyncV(selector:string, config?:object)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nasyncRefetchV(selector:string, asyncFn:function, config?:object)\n// to fetch a data from api, save the results into the store\n\n```\n- with backend with built in subscription like Firestore\n```jsx\nuseAsyncV(selector:string)\n// to listen to asyncData\n\nsetAsyncV(selector:string, asyncFn:function, config?:object)\n//\n```\nfor more explanation: look at the code snippet\n","readmeFilename":"README.md","gitHead":"0d0414407064f2cbbc263b98fbe08104646b321c","_id":"use-sync-v@3.0.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-kr7tsfxKngD+V+wuztibM1rbo1YHilRwYQV4DRy6rJCyIfVzITYIOsWEso3wbdZuaMwZ6KWyVlQItwaCa7x4UQ==","shasum":"97a2e6736371c74a9e1d88919cb36607bee1fa4d","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-3.0.3.tgz","fileCount":87,"unpackedSize":72759,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/KpHEwBYsEe1vUgueRCqr3eTuxCsi9BJYGZeabqxRrQIgAwRmYJ3BZVO8Pr8Yko/GkDM+z4HCg14XCwaDOylDVlY="}]},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_3.0.3_1684068112480_0.43405022953559036"},"_hasShrinkwrap":false},"3.0.4":{"name":"use-sync-v","version":"3.0.4","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\nbreaking change on v3\n\nWhy use sync v ?\n\n- in front all we want is to get synced data from backend\n  - recreating database in front end in a global state is tedious\n  - just subscribe to the data that we need, that we can access anywhere in front end\n- opinionated\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage Example\n\n### To subscribe data from backend for backend without built in subscription\n\n- You want to have a global store that fetch data from backend\n- everytime you modify the backend data, useAsyncSubV will refetch the data for you\n- we use stale data while refetching by default\n- loading and data state can both be true at the same time\n- when the component is dismounted, all fetched data will be erased\n\n```jsx\nconst asyncFn = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const UseAsyncSubVTest = () => {\n  // this will subscribe this component to 'randomUser', whenever we do setAsyncFn with 'randomUser' as selector, the data will refetch\n  const { data, loading, error } = useAsyncSubV('randomUser', asyncFn);\n\n  const refetchHandler = async () => {\n    // we want to modify backend data\n    asyncRefetchV('randomUser', async (p) => {\n      // we can set the data here for optimistic rendering (optional)\n      setSyncV('randomUser', someDataForOptimisticRendering);\n\n      // we can put function here to post / modify data in backend database\n      await insertDataToRandomUserTable();\n\n      // useAsyncSubV will automatically refetch data\n    });\n  };\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n\n// let's say we have another component that we want to use the data from 'randomUser'\nexport const AnotherComponent = () => {\n  // access data from 'randomUser' earlier\n  const { data, loading, error } = useAsyncV('randomUser');\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n```\n### To subscribe data from backend for backend with built in subscription\n\n```jsx\nexport const AsyncSubTest = () => {\n  const {data, loading, error} = useAsyncV('random')\n\n  useEffect(()=>{\n    // set up subscription \n    // then modify state data with \n    setAsyncV('random', dataReturnedFromSubscription)\n    // this way, everytime there's a new data sent from backend, it will automatically stored to 'random' state\n  },[])\n}\n```\n### To have a global state, like redux, zustand etc\n\n```jsx\nsetSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nsetSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nsetSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nsetSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\ngetSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### To recap:\n\n#### For sync global state\n\n```jsx\nsetSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n```\n\n#### For async global state\n- with backend without built in subscription\n```jsx\nuseAsyncSubV(selector:string, asyncFn:function, config?:obj)\n// to subscribe to backend\n\nuseAsyncV(selector:string, config?:object)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nasyncRefetchV(selector:string, asyncFn:function, config?:object)\n// to fetch a data from api, save the results into the store\n\n```\n- with backend with built in subscription like Firestore\n```jsx\nuseAsyncV(selector:string)\n// to listen to asyncData\n\nsetAsyncV(selector:string, asyncFn:function, config?:object)\n//\n```\nfor more explanation: look at the code snippet\n","readmeFilename":"README.md","gitHead":"8ad02edc2efbed8b2d396f17d287bb5c04870c15","_id":"use-sync-v@3.0.4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-DydvnSasT960usv4NjskMwfLdAu+kpW1BeeBkfkDJbDLgL7KXqjl18eGwuoExARKLGR/yM4dXUkhiOS3vqkyjg==","shasum":"96ce677a0c7e95d5f052e1e1cc93b1e0a7ccbdb4","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-3.0.4.tgz","fileCount":87,"unpackedSize":74251,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHRF+A85R1oo6QsOPxUNzSvEgOE5aNCzrZZOC6EM2vjOAiEA94OpI4wUj91P7XpjWj42rk1lN6XlPUwrAU9VqdnBPAY="}]},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_3.0.4_1684212403754_0.9611263405418804"},"_hasShrinkwrap":false},"3.0.5":{"name":"use-sync-v","version":"3.0.5","description":"a custom react hook to sync store, and asyncQuery,","type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"author":{"name":"https://github.com/vikyw89"},"license":"ISC","bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"homepage":"https://github.com/vikyw89/useSyncV#readme","devDependencies":{"@tsconfig/esm":"^1.0.2","@types/diff":"^5.0.3","@types/lodash-es":"^4.17.7","@types/react":"^18.0.37","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","eslint":"^8.39.0","onchange":"^7.1.0","prettier":"^2.8.7","prettier-plugin-organize-imports":"^3.2.2","typedoc":"^0.24.4","typescript":"^5.0.4"},"dependencies":{"diff":"^5.1.0","lodash-es":"^4.17.21","react":"^18.2.0","use-sync-v":"^2.1.4"},"scripts":{"predev":"(git pull || echo 'proceed without git pull') && npm install","tsc":"tsc -p tsconfig.json --watch","test":"cd test && npm install && npm link .. && npm run dev","typedoc":"typedoc --watch","dev":"npm run tsc & npm run typedoc & npm run test"},"readme":"# useSyncV\n\nDOC : https://vikyw89.github.io/useSyncV/\n\nNPM: https://www.npmjs.com/package/use-sync-v\n\nGH: https://github.com/vikyw89/useSyncV\n\nbreaking change on v3\n\nWhy use sync v ?\n\n- in front all we want is to get synced data from backend\n  - recreating database in front end in a global state is tedious\n  - just subscribe to the data that we need, that we can access anywhere in front end\n- opinionated\n\n## To start\n\n```jsx\nnpm i use-sync-v\n```\n\n## Usage Example\n\n### To subscribe data from backend for backend without built in subscription\n\n- You want to have a global store that fetch data from backend\n- everytime you modify the backend data, useAsyncSubV will refetch the data for you\n- we use stale data while refetching by default\n- loading and data state can both be true at the same time\n- when the component is dismounted, all fetched data will be erased\n\n```jsx\nconst asyncFn = async () => {\n  const response = await fetch('https://randomuser.me/api/');\n  const data = await response.json();\n  return data;\n};\n\nexport const UseAsyncSubVTest = () => {\n  // this will subscribe this component to 'randomUser', whenever we do setAsyncFn with 'randomUser' as selector, the data will refetch\n  const { data, loading, error } = useAsyncSubV('randomUser', asyncFn);\n\n  const refetchHandler = async () => {\n    // we want to modify backend data\n    asyncRefetchV('randomUser', async (p) => {\n      // we can set the data here for optimistic rendering (optional)\n      setSyncV('randomUser', someDataForOptimisticRendering);\n\n      // we can put function here to post / modify data in backend database\n      await insertDataToRandomUserTable();\n\n      // useAsyncSubV will automatically refetch data\n    });\n  };\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n\n// let's say we have another component that we want to use the data from 'randomUser'\nexport const AnotherComponent = () => {\n  // access data from 'randomUser' earlier\n  const { data, loading, error } = useAsyncV('randomUser');\n  return (\n    <div>\n      {loading && <div>Loading</div>}\n      {data && <div>{JSON.stringify(data)}</div>}\n      {error && <div>error</div>}\n      <button onClick={refetchHandler}>refetch</button>\n    </div>\n  );\n};\n```\n### To subscribe data from backend for backend with built in subscription\n\n```jsx\nexport const AsyncSubTest = () => {\n  const {data, loading, error} = useAsyncV('random')\n\n  useEffect(()=>{\n    // set up subscription \n    // then modify state data with \n    setAsyncV('random', dataReturnedFromSubscription)\n    // this way, everytime there's a new data sent from backend, it will automatically stored to 'random' state\n  },[])\n}\n```\n### To have a global state, like redux, zustand etc\n\n```jsx\nsetSyncV('counter', 0);\n// create a counter state with initial value of 0\n// this is not a hook, you can call the function anywhere\n\nsetSyncV('counter', (p) => p + 1);\n// this will increment counter state by 1\n\nsetSyncV('data', [\n  {\n    name: 'Irene'\n  },\n  {\n    name: 'Irenelle'\n  }\n]);\n// this will store an Array of Object into \"data\" state\n```\n\nUpdating a deeply nested object is easy\n\n```jsx\nsetSyncV('data[0].phone_number', '010039945');\n// this will add phone number field to the first object in our Array under the name Irene\n\ngetSyncV('data[0]');\n// => {\n//   name:'Irene',\n//   phone_number:'010039945'\n// }\n```\n\n### To have our react component listens to state change with selector\n\n```jsx\nexport const CounterDisplayComponent = () => {\n  const data = useSyncV('data[0]');\n  // sync this component to \"data[0]\" state, will re render component whenever the value of \"data[0]\" state changes\n};\n```\n\n### To recap:\n\n#### For sync global state\n\n```jsx\nsetSyncV(selector:string, updates:function(previousValue) || value)\n// to update the value of the state selector using an updater function or a value\n// the updater function take a parameter (original state) and return a value (updated state)\n// if given a value, it will replace existing value with the value\n\nuseSyncV(selector:string)\n// to subscribe to the state selector, and will re render the component whenever the value change\n// be specific in the selector to prevent unnecessary rerendering\n```\n\n#### For async global state\n- with backend without built in subscription\n```jsx\nuseAsyncSubV(selector:string, asyncFn:function, config?:obj)\n// to subscribe to backend\n\nuseAsyncV(selector:string, config?:object)\n// will subscribe to the selector, and if there's no existing data, it will prepopulate it with {loading, data, error} initial state\n\nasyncRefetchV(selector:string, asyncFn:function, config?:object)\n// to fetch a data from api, save the results into the store\n\n```\n- with backend with built in subscription like Firestore\n```jsx\nuseAsyncV(selector:string)\n// to listen to asyncData\n\nsetAsyncV(selector:string, asyncFn:function, config?:object)\n//\n```\nfor more explanation: look at the code snippet\n","readmeFilename":"README.md","gitHead":"a91af3ede9ba850bec48f5ba32ce6ef9ee19847f","_id":"use-sync-v@3.0.5","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-AHhWsywx7EjQ62XKd7srbuWXCM8jCr5YR2WCvtc5Dw8hVV0GbieBTcWnVvMJgrMUmYZ6macXVS738w8dOuER8w==","shasum":"b9888b18d7ffa73d37a501e2e617120c338bc55e","tarball":"https://registry.npmjs.org/use-sync-v/-/use-sync-v-3.0.5.tgz","fileCount":87,"unpackedSize":74296,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID66ctjuzajfFfX1UuG07m6d1cBmBAVgx7yS/7Vwty+1AiBvtLGi+bi9eiMlZb+vtMNd25DvUQ87e5e2zphBIdNIxQ=="}]},"_npmUser":{"name":"vikyw","email":"vikyw89@gmail.com"},"directories":{},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-sync-v_3.0.5_1684219799262_0.6018880521442065"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-25T09:24:04.865Z","1.0.0":"2023-03-25T09:24:05.066Z","modified":"2023-05-16T13:52:18.340Z","1.0.1":"2023-03-25T11:31:11.582Z","1.0.2":"2023-03-25T11:33:35.668Z","1.0.3":"2023-03-25T18:33:11.654Z","1.0.4":"2023-03-25T23:32:38.267Z","1.0.5":"2023-03-26T07:45:30.775Z","1.0.6":"2023-03-27T07:34:08.721Z","1.1.0":"2023-03-27T08:48:03.556Z","1.1.1":"2023-03-27T08:55:32.088Z","1.1.2":"2023-03-27T10:33:33.792Z","1.1.3":"2023-03-27T10:36:37.466Z","1.1.4":"2023-03-28T05:43:52.460Z","1.1.5":"2023-03-28T05:44:14.068Z","2.0.0":"2023-03-29T07:04:20.239Z","2.0.1":"2023-03-30T05:37:43.526Z","2.0.2":"2023-04-19T17:26:39.309Z","2.0.3":"2023-04-20T07:03:33.554Z","2.0.4":"2023-04-20T07:32:14.874Z","2.0.5":"2023-04-20T10:55:01.790Z","2.0.6":"2023-04-20T13:27:33.817Z","2.0.7":"2023-04-20T15:43:35.871Z","2.0.8":"2023-04-20T16:13:27.972Z","2.0.9":"2023-04-20T16:44:26.517Z","2.0.10":"2023-04-21T11:54:40.778Z","2.0.12":"2023-04-22T08:07:50.551Z","2.0.13":"2023-04-24T18:21:08.811Z","2.0.14":"2023-04-25T07:26:30.698Z","2.0.15":"2023-04-25T07:31:09.493Z","2.0.16":"2023-04-25T07:43:36.284Z","2.0.17":"2023-04-25T12:45:35.008Z","2.0.18":"2023-04-25T13:02:54.675Z","2.0.19":"2023-04-25T13:08:31.597Z","2.0.21-0":"2023-04-26T08:11:36.027Z","2.0.21-1":"2023-04-26T09:36:08.709Z","2.0.21-2":"2023-04-26T16:04:56.959Z","2.0.21-3":"2023-04-26T16:18:38.895Z","2.0.21-4":"2023-04-26T16:30:25.240Z","2.0.21-6":"2023-04-26T16:40:39.370Z","2.1.0":"2023-04-26T16:54:39.966Z","2.1.1-0":"2023-04-27T01:57:37.519Z","2.1.1-1":"2023-04-27T03:21:02.503Z","2.1.1-2":"2023-04-27T03:55:23.637Z","2.1.1-3":"2023-04-27T06:13:48.386Z","2.1.1":"2023-04-27T06:26:11.181Z","2.1.2":"2023-04-27T15:49:19.727Z","2.1.3":"2023-04-27T16:16:47.098Z","2.1.4":"2023-04-29T10:22:01.014Z","2.1.5":"2023-04-29T15:52:26.367Z","2.2.0":"2023-04-29T16:16:02.653Z","2.2.1":"2023-04-30T14:40:18.625Z","2.2.2":"2023-04-30T14:41:36.798Z","2.2.3-0":"2023-05-01T02:21:01.684Z","2.4.0":"2023-05-04T05:10:43.595Z","2.4.1":"2023-05-04T05:50:00.311Z","2.5.0":"2023-05-04T09:00:47.124Z","2.5.1":"2023-05-04T09:33:52.294Z","2.5.2":"2023-05-04T09:38:16.853Z","2.5.3":"2023-05-04T10:24:40.612Z","2.5.4":"2023-05-10T08:56:51.257Z","3.0.0":"2023-05-13T16:54:56.077Z","3.0.1":"2023-05-14T07:58:22.510Z","3.0.2":"2023-05-14T10:12:36.223Z","3.0.3":"2023-05-14T12:41:52.721Z","3.0.4":"2023-05-16T04:46:43.954Z","3.0.5":"2023-05-16T06:49:59.434Z"},"maintainers":[{"name":"weaponsforge","email":"forgeweapons@gmail.com"},{"name":"vikyw","email":"vikyw89@gmail.com"}],"description":"a custom react hook to sync store, and asyncQuery,","homepage":"https://github.com/vikyw89/useSyncV#readme","keywords":["useSyncV","use-sync-v","react","redux","zustand","swr","reactQuery"],"repository":{"type":"git","url":"git+https://github.com/vikyw89/useSyncV.git"},"author":{"name":"https://github.com/vikyw89"},"bugs":{"url":"https://github.com/vikyw89/useSyncV/issues"},"license":"ISC","readme":"","readmeFilename":""}