{"_id":"svelte-writable-derived","_rev":"21-f32f4f2953edbfc756ababcc62b0292f","name":"svelte-writable-derived","dist-tags":{"latest":"3.1.1"},"versions":{"1.0.0":{"name":"svelte-writable-derived","version":"1.0.0","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3"],"author":{"name":"Pikadude No. 1","url":"https://pikadudeno1.com"},"homepage":"https://github.com/PikadudeNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PikadudeNo1/svelte-writable-derived/issues"},"module":"index.mjs","scripts":{"test":"mocha test.js"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"esm":"^3.2.25","mocha":"^6.1.4","svelte":"^3.4.1"},"license":"MIT","gitHead":"9b0ad2c22c75b47586b89d7a910834336b38bc6d","_id":"svelte-writable-derived@1.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-g5hB5kPV+0M4b5P0IejfvZs9d9SpWft+m4CgYzg20nGtABH8Ww8TqEr2LndGPj7D8BVp5Dwy20vbDeNtqcTOXA==","shasum":"5237db76bb3bc550ebe039626c313c1f414427e8","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-1.0.0.tgz","fileCount":4,"unpackedSize":14716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9FpYCRA9TVsSAnZWagAA0WAP/2tQ6N0UQUQXfI/gwLyz\nxhbOhyDg+wKK74iMZO6fJkF3q1j2eUhHaZoV0HVlBN4/hfiClhaJFPjxZPhb\nZKgTOP9Mf4Lg4jOBZlN6H10stJvmjKsUwJvlNeWV8hKZ70jmnTyTW5lGG8qY\nkHvxRd4CEaFZR93FTzzGMGOwLQqquk0u11rFNo1ruAyixcIiRlqw3dPN8/N0\nmKC+XDFZ2pUWjwPnwNPICcj5lbOBCJQvqjt1o//fNW+tynJfFj/ibGiSiXPv\nwqgTR7dMyrH4A7c9oxegC94NQHPCIU7pFIbKaV/hbjcR748N+G26xQXis7me\nH2hBKRSTmImoHhPL4vTzy4y3J078gZvWmnZoqcw63ISjySVvLtJax8e2QxkP\nH0o93lNi6OXnTkD+U6TnUAIpvWFd0jcvzLXfFAAoEwxciukUQ89ZdwexHMKS\n6A61zKdP0Z9yA26WLX1fy2wTkGIHEVtFPHRfRn/dbNTsN2c4gxWsY4F3RAlp\nJO1QFhoUHsFuUfOniByKtnh5Y5Z03Js9OW5OFuLxqZOcCVJekBUO12cHWwaO\nootS3/CtFbhPjD0+utYN8W5LgySjAgnnmnviKkgeyLTF5tRIVbhnYD3t0UBs\nzJsdLooDUBGIp0pOGUiC1GnFjmaXcZoZcdYsBzMs77bqWSHMsb6/ijvAFqyJ\n+9w8\r\n=2yYa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZQD5cvWEvgd2o8RVxo3zS+dTaTipB3TjIErs46GfstAiEAnoVTrUPAHIVyIy3zyTveb8HQDMlGQjIfjWrfIAIh9xw="}]},"maintainers":[{"name":"pikadudeno1","email":"pikadudeno1+npm@gmail.com"}],"_npmUser":{"name":"pikadudeno1","email":"pikadudeno1+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_1.0.0_1559517784117_0.29722528686067395"},"_hasShrinkwrap":false},"1.0.1":{"name":"svelte-writable-derived","version":"1.0.1","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3"],"author":{"name":"Pikadude No. 1","url":"https://pikadudeno1.com"},"homepage":"https://github.com/PikadudeNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PikadudeNo1/svelte-writable-derived/issues"},"module":"index.mjs","scripts":{"test":"mocha test.js"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"esm":"^3.2.25","mocha":"^6.1.4","svelte":"^3.4.1"},"license":"MIT","gitHead":"0efaa18dac14dd9cd9958958d811d4bfa6885f27","_id":"svelte-writable-derived@1.0.1","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-E9J6vvaW4cOomqi/5vAuxO+lg5u8mf6vW5fPuZj3Tq2rGqZqxUkdamXDIlb3SvHlprDH2vdmmjxIhZAiAX3nUA==","shasum":"97c4bee4f111ce90be9a379f265bec1305d8d0fa","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-1.0.1.tgz","fileCount":5,"unpackedSize":15314,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+vtNCRA9TVsSAnZWagAA4loP/j/tHiWUeS4V2biDpWq7\nEW6V1Rw9ZhEYYptVVHPC9l1WN6W6YQiIukCUpPRWIR5N9m4vfgDi5Ics4nM/\nMjFFPGa+9pbpUVPFA0iX/fa5cqtbs24PMhigJRk3yxGq23T7NXIDS+q1Yfsd\nWnH61VkSnhknJ+ONAlF0sUIhsWfG1I+O5iS038vyvAriXU+oyzYY9RS/sGQa\ntEWsNB0MQO6EVj8rl7v3tevjQGHT1QFaSAtEBN9JWwbBMcYxJ2PQYpcGaO0e\nHcxxz4M8hf0H/8T9xPld5Hh0xyxasxGRf5pZXQQn2qaBkQrdX/SnPYOGJHEy\nGScRprnr1mmSNOK5cVFV6QATR4p/N2DmxIF0uIzY1xIdv/hoOPqLxDJw3ckf\nQ7OS05JPB61xnOpgKB6+IDhiB5roF3drEagBe+wor2lycuXtMzJk8rAL/MPS\n+gIMx1uVUudkFGFwTJE+OVinEGYS9Z9NaaIY5E1XDapefHthFGz+GPxI6CkQ\nSf35vYvACInhQWtEVEUemI9zF7SkH1ajMtQuO/FslHR4n8Z7fXZgErOaEsOY\nuajxHf889lDf2AbBb08D4bLREE1bRU0rndsrEteJAV2qR/R82cKqi59bpknC\n8a+jOZSFQn2nzLPlTEWfoRWg+emZPKpqfgj8e20JM3q7DiwnnqonNa1hhP+J\nFiup\r\n=O7v0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZLguhuI62IsWsfAoKhuunfWegJBpt8m2nbWZmmeVKsQIhAN7nTl7413YA+27R9qePK6reR8gKgeMMhAS10716IIcQ"}]},"maintainers":[{"name":"pikadudeno1","email":"pikadudeno1+npm@gmail.com"}],"_npmUser":{"name":"pikadudeno1","email":"pikadudeno1+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_1.0.1_1559952204602_0.8175978836772613"},"_hasShrinkwrap":false},"2.0.0":{"name":"svelte-writable-derived","version":"2.0.0","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3"],"author":{"name":"Pikadude No. 1","url":"https://pikadudeno1.com"},"homepage":"https://github.com/PikadudeNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PikadudeNo1/svelte-writable-derived/issues"},"module":"index.mjs","scripts":{"test":"mocha test.js"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"esm":"^3.2.25","mocha":"^6.1.4","svelte":"^3.5.1"},"license":"MIT","gitHead":"a6140312c6751881bedb1def4948d8d18314f572","_id":"svelte-writable-derived@2.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-NSe7RwaGB9KNb+GexGAEnk4Eyty7cRj5nwzi8ePJWntb1ogJ4a/1+M9lX4dSeymPYz2jbW+FqogJG4UH8yRswA==","shasum":"0f9f5ba5e09b8a6e8f2b35f0019b9080cbde11c0","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-2.0.0.tgz","fileCount":5,"unpackedSize":15066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAieHCRA9TVsSAnZWagAAuY8QAJASyYJTQm62yUt2JzHy\nUBBvk5hkahZ5dA5+4MrlvRwJsmp3Gpz1cCOl4a6BwXiBnF7kK29clGjA52oI\n06I3YQXNONTyCReUemRUW2r3a1Da/W5LDsRDvYxnxRi3FB0pX0S2KOqHCpbd\n3FNbxRCm+8jbOWwczPsefd8cLp8HN98ub8sJkW/EqIzDd+NeJkmF+XGPZH4Q\nvTLQLXG0IMRX++ZCmDvou6/xarAqxojj8BUpJX2b8E/ZtcjGpSn3VvVvOg15\nKuEJnIrZ5XZTjwVxVWTqtaHAaSJuMvXsvlR0ZRzGMnIkcxKZB5hkqnub8skB\nlBF9FbWAQ/MrxJ+5pl4TAyqO7jxqImDyR/ZZNO1egZ27J6tL+PjGOTMI43m2\nfyLl5ADnjY2gUXJHCcbASXz56vPmJb0y87tB8kUWnX1oVza8YCdZsWEf5PcQ\nm7T2Vtvx4AFDT+LEMIy4weKuCyxwp+wI4Bg0GQEIrzd8U47NYZNc1/pppRI2\n58JOOTqX2d5I7zcz6hliXvPrTc8c8MOvoWThdj63jJy6GsnNY/2It9Xm4cw/\nT9gWzu0swxXWXx2YKCtob9B2TaEDUAb1Xn84gMaP7+asIb7sI7EJYFw32QHv\nEz2Wk+AAU22QdbbjDKjUgaW4Rdhpp/DeoaeTVAgtXuge8gzgWahOcvammxrP\nwhlG\r\n=VjRZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJANc1yBwtrx275rVxfxuSf6aPDViyh3AJ2WH9Vq4XJAiEAkUaYBmCM3zlri2Adf2tN22i9027mBP72BMno8ks64YQ="}]},"maintainers":[{"name":"pikadudeno1","email":"pikadudeno1+npm@gmail.com"}],"_npmUser":{"name":"pikadudeno1","email":"pikadudeno1+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_2.0.0_1560422278905_0.48716681030616327"},"_hasShrinkwrap":false},"2.0.1":{"name":"svelte-writable-derived","version":"2.0.1","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3"],"author":{"name":"Pikadude No. 1","url":"https://pikadudeno1.com"},"homepage":"https://github.com/PikadudeNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PikadudeNo1/svelte-writable-derived/issues"},"module":"index.mjs","scripts":{"test":"mocha test.js","prepublish":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"esm":"^3.2.25","mocha":"^6.1.4","svelte":"^3.5.1"},"license":"MIT","gitHead":"12606427ece922688b71544ad4eaf2e6456f378a","_id":"svelte-writable-derived@2.0.1","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-aQ0p4rpFjcfemh0mzXEzQcAbXCC9r8fnHo49Hlx/e14O2T44pJMYiuBwJcciGtDT+b8HRxikAS+DUdwJf3RIPw==","shasum":"268165145bf44c9349b153381985516c76bf4a58","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-2.0.1.tgz","fileCount":5,"unpackedSize":15451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA3f0CRA9TVsSAnZWagAAQ6gP/2dBxuFmHV1Slc3a5Cc2\nyMIaxtI+fVUyivcrYnZry3iMgMt+LZVJ6gZQ++NHk/YPrn2KhFxrBpLg7Soi\nQ4Bz3PNZA8ogi6wfdA16P995aZImx5j60kmEF53x+EoaZBHh9EyUnZXRfEmx\nAv5+vlMDBEKIzVxyPq/k72O7X6IOPZsA4C8+P46ohz4Na5G1F5AH5SiA4S25\nZj8vkPwsp48MbbRbFhU/Xba0aV9yU5/JPItDnkPVD8LTKGaVkuvaW2jG8YDc\n4O6nZTGBfBIP+8fw5HzHvvpMFDCJp80ANx390JEDOfOwUAQiajkQuYnx+O3i\nwEBKKNzSQjACHbVBEHJxWYf6Sp0Wm85OzBKsREZYXGyh3FSbKIgDFtiTeLXM\ni8ReC7EqXQnf+zITUqaQbj+jlW2H1fXWK7o14ffWVopsuO66DITCfu6asPdQ\nQslz2hO3APA9/12e8mkFiz5Or1BA+3p6yF8j0q5HfSS33NGPryo59K6l+xMf\nV3ac0+IP3L+SVxDlh+mstvyMprc0//iPzgffxJvnMflTz9hKMEGp57G5icXf\nO42kLjuTeCfK6/FSYf/8MfumS9BcTBhDBS4lEfACtVxI83tbjge0Yi7VTUfd\nqqDtiNwLMIzNeqTjZu5H4uy33UfykLrgvPQM8gMNGluWb75y6q0xWfD8t0pK\nlHul\r\n=EVkJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKk552wEo9nm8/O9TRUBE7Jl/1Cx5ogzW+4qBMbEHdXgIhALxiZHRv2qAw3LI4MDhezUOnqGMT5f/+ird8Z7b//Iy+"}]},"maintainers":[{"name":"pikadudeno1","email":"pikadudeno1+npm@gmail.com"}],"_npmUser":{"name":"pikadudeno1","email":"pikadudeno1+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_2.0.1_1560508404305_0.17005191093542238"},"_hasShrinkwrap":false},"2.1.0":{"name":"svelte-writable-derived","version":"2.1.0","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"funding":"https://sponsus.org/u/pixievoltno1","module":"index.mjs","scripts":{"test":"mocha test.js","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"esm":"^3.2.25","mocha":"^7.2.0","svelte":"^3.24.0"},"license":"MIT","gitHead":"322400ed2884f04044869f80ca136a5432915799","_id":"svelte-writable-derived@2.1.0","_nodeVersion":"12.16.3","_npmVersion":"6.13.7","dist":{"integrity":"sha512-LivqXGxgyFLJR1IEbabWALV5Ke1xFKZokzdPRCFckHyItexzEMC4eQPO0unUJmL+No7N/S4WMAEWBkA3ZKmMCg==","shasum":"2c3c5463d74fbbc9f52ef65d3d10a3d66feeef11","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-2.1.0.tgz","fileCount":5,"unpackedSize":19648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfG8wQCRA9TVsSAnZWagAA8mUP+gIxNlEan+uTp+XA8EsF\nVrgun+ZI1cnvYGB3iT6b1mhmjjOF+C8JJTrcPvOF9NfNoJIV90cqgje5bl/Y\nbAnCJNbxJPNyyInwMP1+KOKPdUJFlYgf1R0ctPuysrhkFgNq5+qRERcAZiIn\nZiFRz7WFzSnt22/9PCbMcnnTMPjUXVjTmC87ve7y/kpesJpHMduAaCtcfIby\n/wUsy1M2ibTutcs7tKgbDninM7ySmVSxOaXA0rFGAyXTjIlgjrP/OpdCESSG\nTfMAX7BPCRXRhjU+bzSvYrvG/fwDMQz6gGx4IidH+TtDkEneXi2lxBoxZuVy\nWk0Viwfb1avL5f3GhfPwuTJup9jJ23GaLtpuCcaEf41xB60sD+OdB4mLLqan\ndDiUHvW9YaQcZl4Zqcq/r5+ykR0zUmnEqAAhHqVBR/ip6R+1Gf+qabin9YcU\nBpHQwQUua5kZy9zv7vkNbrPi5r8374Js5TSlMTNby56XG/bnh8kxqCyG6BeY\n+PHK5WFKZ8xZ6EuEIwtBRm2DP9aJwgs05YE5tHg0HSWN7j32o5fjJ4T+LSlH\nOfb/3MK0pFt+e5hLYnoTejFOMAMQi2XqiotC0ifDV9bTEYM+witmDSzqOwhY\nMJkHXcEktr/9t8HudCWzAdLCsG9R6yZa4xNqAXrSsocCGi0XBCQ+TWaq/bja\niGGo\r\n=GY4I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIALtsvYp7XQXE0JIEXBSq2E+yNJqwNgtO7WKnzvpfMJhAiEAmsIh8SyriJAp+HkNubMJfkGGnNlylJagCXYqvXjqQwo="}]},"maintainers":[{"email":"pixievoltno1+npm@gmail.com","name":"pixievoltno1"}],"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_2.1.0_1595657231519_0.25615228665421474"},"_hasShrinkwrap":false},"2.1.1":{"name":"svelte-writable-derived","version":"2.1.1","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://sponsus.org/u/pixievoltno1","module":"index.mjs","exports":{".":"./index.mjs","./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha test.js","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"esm":"^3.2.25","mocha":"^7.2.0","svelte":"^3.24.0"},"license":"MIT","gitHead":"de5419e036c852bb0370a92d0b744e3cb1abaf59","_id":"svelte-writable-derived@2.1.1","_nodeVersion":"12.16.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-bmboHUWpO/dZCBGm/gLGeT53cbbdmb9igLlycQYFxhmNB1Frt1Y1QV6PJeJj16TeUzDcR5XD3ddE7O8iXQHclw==","shasum":"9e3cec9ab60729ca0bd3e4edf8421f22bbd4e39a","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-2.1.1.tgz","fileCount":5,"unpackedSize":19948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu0K9CRA9TVsSAnZWagAAcR8QAJZWacqVAWFWQ1RvZjBZ\ndr3C7QtdTSkXyrM8e8Doz3eWnoRH38rIx/rsvJj/T+wPkMezjuAA7yfEKaWs\n2BnTIJOcx0W0oYYnAE461zO5thi+vs8m4KB5+AYyUgn31/OZNexS56tM3yWl\nS+mS1/bY4wQ6vlv8ZKyTeXNqhHPpj+C6xwKu9jQjLdr+I6LpIzbN1KhpC+tw\nYFiN/P2hk//hUqLyaorH9JxZ6XN6IEnFnoAPILdG+xuasnkVguds3+S2YwNK\nHui4YOG0VyfOb7CWyHbKk1tqPo2dAj6szFMpI7YsdNM8FDuFDL+9il3Etmaq\nls2xtBF5u3wNka+vugb29RlUoGCIdtUTm4v+0QiWdA0hChBwE6e9qseB2BNV\n4aN2LZxqUhf+cfmGGDbjM2yzBEQcJt8y/LIfkuiG+eKDkM+SBg6j3EQNz3bQ\nMuARWCZWY+LU/sJW4CNZUmE1SfAZjvCPpSLoyD13bkx8wn3UG/EUDWSQtWNU\nlA5Lx2+SOa1VPTPXybmZVAD/pV01pyrJsUEcZ3sXomMgDUOU8GXKPZwqHS3W\nvc1Tv6aZ2CJPn6gbmoQH5gRikIU6IEeGcVthvsJgYbESL5ZC3QkcuK8mQ468\nM9N+G6QEUkUZ7VlMY+bOySQCAMxN41SXjYnsUbewFNCNz5YdtjVm3QEF5yh6\n5P18\r\n=gpVN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjACpDDEckTVxl2j7Ywel5RoVsaV+M9T6FyCR7hNVbyQIgBZWBpTUU7A1IIfbsYujA75ZgHMrThOKevi07x8t57QE="}]},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_2.1.1_1606107837318_0.03305498827472486"},"_hasShrinkwrap":false},"2.1.2":{"name":"svelte-writable-derived","version":"2.1.2","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://sponsus.org/u/pixievoltno1","module":"index.mjs","exports":{".":"./index.mjs","./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha test.mjs","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"mocha":"^9.1.3","svelte":"^3.44.1"},"license":"MIT","gitHead":"d7a69864d2a4ab0cdc7f83725d312405a97204f2","_id":"svelte-writable-derived@2.1.2","_nodeVersion":"12.22.6","_npmVersion":"7.20.1","dist":{"integrity":"sha512-Mt4qMRFIQb+xK2JE3YeUkurIjIhdX9dwi3MMYp3s5cIGZXighfHOZwvxsaZccHOGJtaUwXxNBL0ycJ0s/Rus/Q==","shasum":"ca9ee08acfb7b17389b38e98f341c159c9755721","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-2.1.2.tgz","fileCount":4,"unpackedSize":18203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh28hjCRA9TVsSAnZWagAA9RgP/RG8HyRUK7fPmzZ6vRXM\nR15o4Yk0t3DIDAcxxO9OPlLPUpFyRP4lX8HQCGEBn1YbJGK/5P/JGQle6YqP\nHfN7OUtxnl132saQJAplkUEkDah7uBwYXIuSv5dW1HZY2cz6aObGkdZZlQrX\nsIfZheDkMq5ZznVj09w6ROvtIwskaQmWE9mpvTYSjpbFNg2INQGLSr0j7smV\n99fYUgs9cOT7/zko2pVAOvLIHYFgAq1/3ZPV2D+T3q26qgredhHaAJDinl6g\n68H1uF2z/7OxHCZ0XMDz+a1KrT4Cfg0ySK9I7hAAS0aU4LbbmqUiVsQYGM1J\nRpStIfR5jlRE8OM+IcHfgVsYKN8d1dbihG2710TWQ9EGlPkrZpBDYxF+PSC1\nG4ttAct25Hzmare6b2cC5uSN/Fonrr4iWtFHkZFThzFMIMGPN1D/8knArd3Y\nh/XT4eGAUx6eqXWGATOiQLkY+I2WGN2pP4n3d3nY2bQjJE79q2CQb08mJ20o\npYlzCC3kmFuQgLVkyrmQDnhgNRAEzRpf/zEd83qJQhaxfFsQ4RZCH92Q77Zc\niPWI0tEMLVsBBurL+oHal+11komkm8s7aIri4TQuxjjPl/SEWKstWzUpDa7O\nhWIqUdDORBjvQI83giUl+BaanvMud2GiBLqEmJFsAyJXYKgyM40G9f3r2atz\nnl5x\r\n=CSNB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJ9/JDeg/E4cw2w68wyYngpxQXGWMm1cT5Tg8tlMTbcwIhAKY1Qbb0kLmjO7hLanThd8V/gtini0nTc2zHKXDyulUI"}]},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_2.1.2_1636880582545_0.3860939275130104"},"_hasShrinkwrap":false},"2.1.3":{"name":"svelte-writable-derived","version":"2.1.3","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://sponsus.org/u/pixievoltno1","module":"index.mjs","types":"index.d.ts","exports":{".":{"default":"./index.mjs","types":"./index.d.ts"},"./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha test.mjs","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"mocha":"^9.2.2","svelte":"^3.46.4"},"license":"MIT","gitHead":"2346b3d250ec1ad48730ef938900bff196f4bac9","_id":"svelte-writable-derived@2.1.3","_nodeVersion":"16.13.2","_npmVersion":"8.1.3","dist":{"integrity":"sha512-jBOCYadQWf7/97KIuDN7lCA1Z8QJWMje9BbS2EQDLYuDxjPW3rkwOdK5SbkXyQL8cdv90uxedyDblQ/zVFzuYQ==","shasum":"2dc86632d285a1ca583f49918dba7090ece3a5b8","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-2.1.3.tgz","fileCount":5,"unpackedSize":23106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiN8+pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIkg//RJE3zbD+47gKXIMhOh4+P12vXZ6vSMkodEMghvv0XP8jf+A2\r\nJPNCFXrIqe713xRlb0Kgw2kW7zQjyxsOEKUS3JNTiFESauuIh+b8upFXimmY\r\nuGRVs/aDODeTi9h+TuJZtMy8T7bpLmvGpgLD7QJVWW7GBrAe4Aa3waOnXnaO\r\nJcDJN4y1zVzEkcVPMFLL8v4yfqKley4ZepQ/WWy+OwFxPi7I22Je4hJeGuwA\r\ngm2IzZ0LQqa0tGE4TMweVmqZFls4skTMnSojjVcnvc5Mzik1uGkm0teT/Ifj\r\njOE59XZ6FWfD6sM+YHglz2amvo3NCXsyWc1TN1o4o9dtYoTeC1CoZQzTEIb9\r\nTW2SZ2Js850JvSAQu0xuEWgqQJv4tSTuVtkHBaqr6F1AnwxPw6spRkgm7l7q\r\nghmrtQoSsOYAOy1/PdG+EszJdXxh2U5LXecfnalmtTjLBPfCpgtGvlHQYjbB\r\nh+/JZuiLVlwgVuc9rfyxIoOOFCHCG4yvtV1+jw4hRwYQt5fazHZmklq2YVbs\r\nb08BYymZolRoWQFCYgjAfBa7RQLveB08NKUPwtjekvDOcJjPYMwt6feGortG\r\ncU8e3poZ8miEQ8C5AVnJSilTM3GeJ2XwT9YXAPhZULmM3d1MZqKVMNqyz2dk\r\nxwr+pXKpkaMy1rjafDdN0/MyrarGHl00T1Y=\r\n=eDeg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiOxunpQFNTqNprU614IzACoUdUaJozpfedqX/H1dx+QIgaQMXG1ia6oY10n4NHtdex2E9Ohjpmq7h7JsS+3OfY7Y="}]},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_2.1.3_1647824808827_0.5056776218868559"},"_hasShrinkwrap":false},"2.1.4":{"name":"svelte-writable-derived","version":"2.1.4","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://sponsus.org/u/pixievoltno1","module":"index.mjs","types":"index.d.ts","exports":{".":{"default":"./index.mjs","types":"./index.d.ts"},"./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha test.mjs","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"mocha":"^9.2.2","svelte":"^3.46.4"},"license":"MIT","gitHead":"46a8ab55d95d74aa44833c0dcc49d22fe12f4794","_id":"svelte-writable-derived@2.1.4","_nodeVersion":"16.13.2","_npmVersion":"8.1.3","dist":{"integrity":"sha512-YDYjcet5hCqoVgikuPR/WcOCPfk0NBsjDdgiEHIZpG0ad7MSDDLKv8V/HFQb+0pNk9zCvxbpda6JVV+7+lJRGg==","shasum":"a68174d8cdf74f1e368f7c98d2b49942ffe95d15","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-2.1.4.tgz","fileCount":5,"unpackedSize":24282,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1rL7bQv8A/BqZyt8W4FEVcerMAw0ior9LxONdTygMxAiAC5i8itM922Hb82LIhx6v9lWIdvwX0/32X2LxA1aR/2Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJist2LACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq30BAAhQDxy+mdsNWiNUZ47nT6glVghM6o7Z9GQ4ouIxJOX0hRpYJS\r\nsauczgRlPbSCwycRB52MQpSe9OPAR9VDPkrni96z5NzRyhhT0Fytgu2YbZsz\r\nj3SkJSTREf+1EPJ2QB9anD2WpdBEu26qpTghcCyRc4OLB2KKHyecBvUHiO/2\r\nwbuI8lev8A4Rc0J1YtW0RZoBjCtAYH6eVghWJlmMPGx/MqjQjk5hgN17j1ia\r\n8JdUO0bdgKAkjhRt36SiQUP/pyeZtRFv7tEz1/hpixD45rZbwqcHEl3MTaHs\r\n8gAQwVkDVlYtzVSwkTZe5AXygO/mzPNGMgOU32h6iknVJpOuCoRBBzavVS55\r\nrTf+eN/YujsLZDQMk/lhIXyehs6ff2KlWZQgVuLniFyBb9d7kakKPATISrqt\r\nb0y/fI150LWPBdZaAR9a8pZoqKFUHYP7C9LI2aquMYbuUQZnqokjvqfhlQQt\r\nCC+8DQ1SbF8yWSyLPnpVJ+9ASzvuWZl7JJfBtc4FYo25HmLdMdxeQmKJzvcv\r\njGH5cOtaG/amWncRiXogi6NaB6bN7giEIoX094aLSYLBmWSoYlP7JWxrswk1\r\nTaymsvuvtkdqzH0m3D+tIW7IQIS9qdoqoZWJZF+RHPOpi7AMt8RNIqizPBgj\r\nwLtNtB+6gnPnclNCvEM7v801xyoJ1a8gqGE=\r\n=jEpw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_2.1.4_1655889291106_0.7435400885525156"},"_hasShrinkwrap":false},"2.1.5":{"name":"svelte-writable-derived","version":"2.1.5","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://sponsus.org/u/pixievoltno1","module":"index.mjs","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.mjs"},"./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha test.mjs","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"mocha":"^9.2.2","svelte":"^3.46.4"},"license":"MIT","gitHead":"5ff62d39163fb04c9cdfc68826d7021d22d25a74","_id":"svelte-writable-derived@2.1.5","_nodeVersion":"16.13.2","_npmVersion":"8.1.3","dist":{"integrity":"sha512-g26/W1iWj7FlLwaggNwXxHwMSf70/bHAYcpBT/EijijjakCSU9/PXmn31fL/kw2P1SzVEU6ayyCFuNYqTY3RUw==","shasum":"c2fc5cbaf13ad6c8a41facd390ec80cd24397920","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-2.1.5.tgz","fileCount":5,"unpackedSize":24282,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEw2SFJOG0IcDQNUMOuyNE+hJJFsfjoFbl4QwhjhVS8mAiBPPBVvlZe7I4Bf8swVojBKbcu15BJcGhpkXJ/mqv+y9g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwkQpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnhA//V70SDXkn+3f4wZ/gGpp/RHDR3BC6F4ouj1llnSpXGWH0IVMO\r\n0iSwEOhTSPqm7SLMNAY0RbTBM++q+bOtu9t6Lhd6XAEa8ogaZODGQ6fONc/1\r\n4Gqxmz9W8d0Y8pkO33i6OhXsfQ6fd1muS+P+OKFT5xbC14wWwHUtnUBAncp2\r\nUxbZmihQWcA9OYr3zIMmgjSidU//bv5FZE0riXePoCexVCXpn6Yq+hgUGfWs\r\nsKg2+XC33nC7Oswe/355BwmMzPmoKOPty/3JBPg7JCLs4cnVoAvHxs04pBs/\r\nhbpFPgwWZh1PMvJJLhY5Gw2oG7vW8eZPf1UG98nJxifdUQFJQBcM9oQBZqEm\r\n1JSNtwIoQpLcCzyKZlq8cDlGSJ3hGibnOSEDGkuR77wGAmq893MTJt/wgheA\r\nDoZNCK/T+0j6i/bI2GxwjYZQkJCV3du5qTXdJgCtrrYD84q3lL2OmS/KAYsU\r\n7s4ezH2LW2L5C6a/vdUgPuQIWBv52+gyx01AvfBLR9+Zdkunad0lHBQZUGu3\r\nMPRe+4BoJvBezBHRyHbOhcSI5n527wVeIxMSYzT1RwBlNPLK5GgvQA23yokf\r\n935P3R//5ZYZG1/3vu2C2isZzGV/tUVFOjONFlIdUpyJnTJzP0hyiGI+HTJO\r\nKf3BxdnZ0c8wyheMyRV7Xl/ocURwLOFcsN0=\r\n=w0Zy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_2.1.5_1656898601342_0.20609308209357402"},"_hasShrinkwrap":false},"3.0.0":{"name":"svelte-writable-derived","version":"3.0.0","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","derived","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://ko-fi.com/pixievoltno1","module":"index.mjs","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.mjs"},"./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha test.mjs","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"mocha":"^9.2.2","svelte":"^3.55.0"},"license":"MIT","readme":"# svelte-writable-derived\n[![npm](https://img.shields.io/npm/v/svelte-writable-derived.svg)](https://www.npmjs.com/package/svelte-writable-derived) [![Bundle size](https://img.shields.io/bundlephobia/minzip/svelte-writable-derived.svg)](https://bundlephobia.com/result?p=svelte-writable-derived) ![GitHub CI Status](https://img.shields.io/github/actions/workflow/status/PixievoltNo1/svelte-writable-derived/node.js.yml?branch=master&label=tests) [![License](https://img.shields.io/github/license/PixievoltNo1/svelte-writable-derived.svg)](https://github.com/PixievoltNo1/svelte-writable-derived/blob/master/LICENSE.txt) ![GitHub Repo stars](https://img.shields.io/github/stars/PixievoltNo1/svelte-writable-derived?style=social)\n\nFor users of [Svelte](https://svelte.dev/) v3, this is a read-write variant of Svelte's [derived stores](https://svelte.dev/tutorial/derived-stores) that accepts an extra callback to send values back to the source. It builds on the derived & writable stores provided by Svelte, and emulates their behavior as closely as possible.\n\nThis project has a [Code of Conduct](CODE_OF_CONDUCT.md). By participating in the Git repo or issues tracker, you agree to be as courteous, welcoming, and generally a lovely person as its terms require. 😊\n\n<!-- Table of contents generated mostly by the markdown-toc package - however, it includes emoji in the URLs, and they need to be stripped for GitHub -->\n\n<!-- toc -->\n\n  * [Default & named export: `writableDerived()`](#default--named-export-writablederived)\n    + [New parameter: `reflect`](#new-parameter-reflect)\n  * [Named export: `propertyStore()`](#named-export-propertystore)\n  * [Regarding Subscription-less `svelte-writable-derived` Stores](#regarding-subscription-less-svelte-writable-derived-stores)\n  * [Examples](#examples)\n    + [Making an object store from a JSON string store](#making-an-object-store-from-a-json-string-store)\n    + [Making a single-value store from an object store](#making-a-single-value-store-from-an-object-store)\n      - [... when the object is an array](#-when-the-object-is-an-array)\n      - [... when the value is deeply nested in the object](#-when-the-value-is-deeply-nested-in-the-object)\n    + [Making an object store from several single-value stores](#making-an-object-store-from-several-single-value-stores)\n    + [Chaining all of the above together](#chaining-all-of-the-above-together)\n  * [Browser compatibility](#browser-compatibility)\n- [💖 Support the developer](#-support-the-developer)\n  * [💸 ... with money](#--with-money)\n  * [💌 ... with kind words](#--with-kind-words)\n  * [🤝 ... with a job](#--with-a-job)\n\n<!-- tocstop -->\n\n## Default & named export: `writableDerived()`\n\n<i>Parameters: `origins` ([store](https://svelte.dev/docs#component-format-script-4-prefix-stores-with-$-to-access-their-values-store-contract) or array of stores), `derive` (function), [`reflect`](#new-parameter-reflect) (see documentation), optional `initial` (any)</i><br>\n<i>Returns a store with [`writable`](https://svelte.dev/docs#run-time-svelte-store-writable) methods</i>\n\nCreate a store that behaves similarly to [Svelte's `derived`](https://svelte.dev/docs#run-time-svelte-store-derived), with `origins`, `derive`, and `initial` working like its 1st, 2nd, and 3rd parameters respectively. Values introduced to the store via its `set` and `update` methods are passed to the new 3rd parameter, `reflect`, which can in turn set values for the origin stores.\n\nAs long as `derived` and `reflect` set stores only by the means provided to them and not via any store's methods, they won't trigger calls to each other.\n\n### New parameter: `reflect`\n\n<i>Function with parameters: `reflecting` (any), optional `old` (any)</i>\n\nThis function is called when the derived store gets a new value via its `set` and `update` methods (not via the `derive` callback). Its `reflecting` parameter is this new value, and `old` is the origin store's current value, or an array of values if `origins` is an array. It must return a value to set in the origin store, or an array of values to set if `origins` was an array. If the returned array is sparse or shorter than `origins`, it will only set the stores it has elements for, and other stores don't necessarily need to be writable.\n\n`reflect` is called after the derived store's subscriptions are called. If the derived store has its `set` and/or `update` methods called again in the process of calling its subscriptions, `reflect` will be called only once, with the most-recently-set value.\n\n`arguments` and rest parameters will not receive `old` unless the function's [length](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length) is at least 2.\n\n## Named export: `propertyStore()`\n\n<i>Parameters: `origin` ([store](https://svelte.dev/docs#component-format-script-4-prefix-stores-with-$-to-access-their-values-store-contract)), `propName` (string, number, symbol, or array of strings/numbers/symbols)</i><br>\n<i>Returns a store with [`writable`](https://svelte.dev/docs#run-time-svelte-store-writable) methods</i>\n\nA utility wrapper for `writableDerived`. Given a store containing an object, this function returns a store containing the value of the object's property `propName`. If `propName` is an array, it's used as a path to navigate nested objects.\n\n## Regarding Subscription-less `svelte-writable-derived` Stores\n\nOne of the ways this package emulates the behavior of Svelte's `derived` is that it does not subscribe to any origin store until the derived store itself has a subscription. However, there's an exception: Calling the `set` and `update` methods when the derived store has no subscriptions will subscribe to & then unsubscribe from all its origins.\n\n## Examples\n\n### Making an object store from a JSON string store\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport writableDerived from \"svelte-writable-derived\";\n\nvar jsonStore = writable(`{\"I'm a property\": true}`);\nvar objectStore = writableDerived(\n\tjsonStore,\n\t(json) => JSON.parse(json),\n\t(object) => JSON.stringify(object)\n);\nconsole.log( Object.keys( get(objectStore) ) ); // [\"I'm a property\"]\nobjectStore.set({\"I'm not a property\": false});\nconsole.log( get(jsonStore) ); // \"{\\\"I'm not a property\\\": false}\"\n```\n\n### Making a single-value store from an object store\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport { propertyStore } from \"svelte-writable-derived\";\n\nvar objectStore = writable({\"a horse\": \"a horse\", \"of course\": \"of course\"});\nvar valueStore = propertyStore(objectStore, \"a horse\");\nconsole.log( get(valueStore) ); // \"a horse\"\nvalueStore.set(\"*whinny*\");\nconsole.log( get(objectStore) ); // {\"a horse\": \"*whinny*\", \"of course\": \"of course\"}\n\n// propertyStore is just a wrapper. You could also use writableDerived directly:\n\nimport writableDerived from \"svelte-writable-derived\";\n\nvar valueStore = writableDerived(\n\tobjectStore,\n\t(object) => object[\"a horse\"],\n\t{ withOld(reflecting, object) {\n\t\tobject[\"a horse\"] = reflecting;\n\t\treturn object; // needed to call objectStore.set with the proper value\n\t} }\n);\n```\n\n#### ... when the object is an array\n\n```javascript\n// An array is an object with numerically-named properties.\n// Access them using a number for the propName parameter.\n\nimport { writable, get } from \"svelte/store\";\nimport { propertyStore } from \"svelte-writable-derived\";\n\nvar treasureCoordinates = writable([7, -2, 31]);\nvar treasureElevation = propertyStore(treasureCoordinates, 1);\nconsole.log( get(treasureElevation) ); // -2\ntreasureElevation.set(1); // dig up the treasure\nconsole.log( get(treasureCoordinates) ); // [7, 1, 31]\n```\n\n#### ... when the value is deeply nested in the object\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport { propertyStore } from \"svelte-writable-derived\";\n\nvar objectStore = writable({ deeply: { buried: { item: \"trash\" } } });\nvar valueStore = propertyStore(objectStore, [\"deeply\", \"buried\", \"item\"]);\nconsole.log( get(valueStore) ); // \"trash\"\nvalueStore.set(\"treasure\");\nconsole.log( get(objectStore) ); // { deeply: { buried: { item: \"treasure\" } } }\n\n// Using writableDerived directly:\n\nimport writableDerived from \"svelte-writable-derived\";\n\nvar valueStore = writableDerived(\n\tobjectStore,\n\t(object) => object.deeply.buried.item,\n\t{ withOld(reflecting, object) {\n\t\tobject.deeply.buried.item = reflecting;\n\t\treturn object; // needed to call objectStore.set with the proper value\n\t} }\n);\n```\n\n### Making an object store from several single-value stores\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport writableDerived from \"svelte-writable-derived\";\n\nvar valueStore1 = \"sparta\", valueStore2 = \"monty python's flying circus\";\nvar objectStore = writableDerived(\n\t[valueStore1, valueStore2],\n\t([value1, value2]) => ( {\"this is\": value1, \"it's\": value2} ),\n\t(object) => [ object[\"this is\"], object[\"it's\"] ]\n);\nconsole.log( get(objectStore) ); // {\"this is\": \"sparta\", \"it's\": \"monty python's flying circus\"}\nobjectStore.set( {\"this is\": \"rocket league\", \"it's\": \"over 9000\"} );\nconsole.log( get(valueStore1), get(valueStore2) ); // \"rocket league\" \"over 9000\"\n```\n\n### Chaining all of the above together\n\n```javascript\n// What if Rube Goldberg were a JavaScript developer?\nimport { writable, get } from \"svelte/store\";\nimport { writableDerived, propertyStore } from \"svelte-writable-derived\";\n\nvar jsonStore = writable(`{\"owner\": \"dragon\", \"possessions\": [\"crown\", \"gold\"]}`);\nvar hoardStore = writableDerived(\n\tjsonStore,\n\t(json) => JSON.parse(json),\n\t(object) => JSON.stringify(object)\n);\n\nvar hoarderStore = propertyStore(hoardStore, \"owner\");\nvar hoardContentsStore = propertyStore(hoardStore, \"possessions\");\n\nvar itemListStore = writableDerived(\n\t[hoarderStore, hoardContentsStore],\n\t([hoarder, hoardContents]) => {\n\t\treturn hoardContents.map( (item) => {\n\t\t\treturn {item, owner: hoarder};\n\t\t});\n\t},\n\t(itemList) => {\n\t\t// This is only for demonstration purposes, so we won't handle differing owners\n\t\tvar hoarder = itemList[0].owner;\n\t\tvar hoardContents = itemList.map( (itemListEntry) => {\n\t\t\treturn itemListEntry[\"item\"];\n\t\t} );\n\t\treturn [hoarder, hoardContents];\n\t}\n);\n\njsonStore.subscribe(console.log);\nhoardStore.subscribe(console.log);\nhoarderStore.subscribe(console.log);\n// skipping hoardContentsStore\nitemListStore.subscribe(console.log);\nitemListStore.update( (itemList) => {\n\treturn itemList.map( (itemListEntry) => {\n\t\treturn {item: itemListEntry.item, owner: \"protagonist\"};\n\t} );\n} );\n/*\n\tUpon the update, the console logs:\n\t[{item: \"crown\", owner: \"protagonist\"}, {item: \"gold\", owner: \"protagonist\"}]\n\t\"protagonist\"\n\t{owner: \"protagonist\", possessions: [\"crown\", \"gold\"]}\n\t\"{\\\"owner\\\": \\\"protagonist\\\", \\\"possessions\\\": [\\\"crown\\\", \\\"gold\\\"]}\"\n*/\n```\n\n## Browser compatibility\n\nThis package should run anywhere Svelte can run. Use transpilers/polyfills as needed.\n\n# 💖 Support the developer\n\nI muchly appreciate any way you'd like to show your thanks - knowing people are helped gives me warm fuzzies and makes it all worthwhile!\n\n## 💸 ... with money\n\nAt [my Ko-Fi page](https://ko-fi.com/pixievoltno1), you can make a one-time or monthly donation, or [commission work on an issue](https://ko-fi.com/pixievoltno1/commissions).\n\n## 💌 ... with kind words\n\nCurrent contact info is on [this page](https://pixievoltno1.com/contact/) - or you can create an \"issue\" on this repo just to say thanks! Thank-you \"issues\" will be closed right away, but are treasured regardless~\n\n## 🤝 ... with a job\n\nWant me to sling some JavaScript for you? [Look over my other work](https://github.com/PixievoltNo1) and [contact me!](https://pixievoltno1.com/contact/)","readmeFilename":"README.md","gitHead":"8d0b3f275188c67184399c2c15f48503e0beaff1","_id":"svelte-writable-derived@3.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.3","dist":{"integrity":"sha512-wpr7lPaCMy8cLwya05BGTStvVfpGNrwwoOjtt8Qvsg3EGNszBr+aax31c0pjyXHH5OWd1ltPd4lz8FNMeUC0/A==","shasum":"660d14fb56b5d9c1a5d8aab1ff933133431d3505","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-3.0.0.tgz","fileCount":5,"unpackedSize":21610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQCcjUIXA4Mr4qoGzOluC67rMXPPrBHanBhBjdqLwdkhvgIfOQz5jh3vh/6DfkDlaRR92Dj1MiYukigS/Sdvm1KZ1g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjp+V7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrUlw/+MNChJ7zW5MRzToxsbFJ9NVcEDsLq8CP4N8kVl16Rll1XFv2Z\r\nrkOVhkj4hIuNB+LGDI3ZTXoeYGZpbv24RO9rkzff+P97UOBjIFUvf0PbPw7j\r\n7+U9c3Ryr+/gd1PHnbsm7P2FmOv3H5O96hKAjvsr+M/ruMZcrryhc0VJXuQb\r\nGXjbOJuEfzaHvjId/Dqj9m6KjRFg+7C3hnlDqP4iVqSQclJeE6RaKfD8QQDY\r\nZb/NpavY2f2KNsUvR7RaFfX00RvLkM630CNiIxKx2gbMq3bsGvPI4G8pKqlE\r\nULbW+AJuJVe/m7YgBt2/CT7d1Rcg/IzYb/2vUdqXrgCPlvhRhdI0yRPUkH43\r\nlfGYa+UJn9NX8LqfG9csDl1hNePassxG7eNqOWcwm9ju7uCulnTFeVOWz1eD\r\ndJgmAZ3gT7DdYsBnR+BLEcUmQqF1LkyxEN74MBUh9duNT0bGkntviOBmYAS2\r\n6ETltbm7/nIjcREgDYYjpoWAlijZPQznMU+p+SFC3rnzplXZRPTkv1IDQ5+p\r\nqKWFO+zQEua11wgZAOWMmYIzIbQKeh9JqPRHETjKdQdX0SX9T5fGpK5skP3E\r\nA8c+/jHJKKpMAi3zOMbzSYgYUH2JH0YpW4M/am3VFxsAyu/ySDNb7IkVZhHI\r\njMn9rbyhbH11w8D+QcVEez0/LhZx5/2aW88=\r\n=BcgO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_3.0.0_1671947643694_0.5860771068861022"},"_hasShrinkwrap":false},"3.0.1":{"name":"svelte-writable-derived","version":"3.0.1","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","derived","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://ko-fi.com/pixievoltno1","module":"index.mjs","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.mjs"},"./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha test.mjs","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"mocha":"^9.2.2","svelte":"^3.55.0"},"license":"MIT","readme":"# svelte-writable-derived\n[![npm](https://img.shields.io/npm/v/svelte-writable-derived.svg)](https://www.npmjs.com/package/svelte-writable-derived) [![Bundle size](https://img.shields.io/bundlephobia/minzip/svelte-writable-derived.svg)](https://bundlephobia.com/result?p=svelte-writable-derived) ![GitHub CI Status](https://img.shields.io/github/actions/workflow/status/PixievoltNo1/svelte-writable-derived/node.js.yml?branch=master&label=tests) [![License](https://img.shields.io/github/license/PixievoltNo1/svelte-writable-derived.svg)](https://github.com/PixievoltNo1/svelte-writable-derived/blob/master/LICENSE.txt) ![GitHub Repo stars](https://img.shields.io/github/stars/PixievoltNo1/svelte-writable-derived?style=social)\n\nFor users of [Svelte](https://svelte.dev/) v3, this is a read-write variant of Svelte's [derived stores](https://svelte.dev/tutorial/derived-stores) that accepts an extra callback to send values back to the source. It builds on the derived & writable stores provided by Svelte, and emulates their behavior as closely as possible.\n\nThis project has a [Code of Conduct](CODE_OF_CONDUCT.md). By participating in the Git repo or issues tracker, you agree to be as courteous, welcoming, and generally a lovely person as its terms require. 😊\n\n<!-- Table of contents generated mostly by the markdown-toc package - however, it includes emoji in the URLs, and they need to be stripped for GitHub -->\n\n<!-- toc -->\n\n  * [Default & named export: `writableDerived()`](#default--named-export-writablederived)\n    + [New parameter: `reflect`](#new-parameter-reflect)\n  * [Named export: `propertyStore()`](#named-export-propertystore)\n  * [Regarding Subscription-less `svelte-writable-derived` Stores](#regarding-subscription-less-svelte-writable-derived-stores)\n  * [Examples](#examples)\n    + [Making an object store from a JSON string store](#making-an-object-store-from-a-json-string-store)\n    + [Making a single-value store from an object store](#making-a-single-value-store-from-an-object-store)\n      - [... when the object is an array](#-when-the-object-is-an-array)\n      - [... when the value is deeply nested in the object](#-when-the-value-is-deeply-nested-in-the-object)\n    + [Making an object store from several single-value stores](#making-an-object-store-from-several-single-value-stores)\n    + [Chaining all of the above together](#chaining-all-of-the-above-together)\n  * [Browser compatibility](#browser-compatibility)\n- [💖 Support the developer](#-support-the-developer)\n  * [💸 ... with money](#--with-money)\n  * [💌 ... with kind words](#--with-kind-words)\n  * [🤝 ... with a job](#--with-a-job)\n\n<!-- tocstop -->\n\n## Default & named export: `writableDerived()`\n\n<i>Parameters: `origins` ([store](https://svelte.dev/docs#component-format-script-4-prefix-stores-with-$-to-access-their-values-store-contract) or array of stores), `derive` (function), [`reflect`](#new-parameter-reflect) (see documentation), optional `initial` (any)</i><br>\n<i>Returns a store with [`writable`](https://svelte.dev/docs#run-time-svelte-store-writable) methods</i>\n\nCreate a store that behaves similarly to [Svelte's `derived`](https://svelte.dev/docs#run-time-svelte-store-derived), with `origins`, `derive`, and `initial` working like its 1st, 2nd, and 3rd parameters respectively. Values introduced to the store via its `set` and `update` methods are passed to the new 3rd parameter, `reflect`, which can in turn set values for the origin stores.\n\nAs long as `derived` and `reflect` set stores only by the means provided to them and not via any store's methods, they won't trigger calls to each other.\n\n### New parameter: `reflect`\n\n<i>Function with parameters: `reflecting` (any), optional `old` (any)</i>\n\nThis function is called when the derived store gets a new value via its `set` and `update` methods (not via the `derive` callback). Its `reflecting` parameter is this new value, and `old` is the origin store's current value, or an array of values if `origins` is an array. It must return a value to set in the origin store, or an array of values to set if `origins` was an array. If the returned array is sparse or shorter than `origins`, it will only set the stores it has elements for, and other stores don't necessarily need to be writable.\n\n`reflect` is called after the derived store's subscriptions are called. If the derived store has its `set` and/or `update` methods called again in the process of calling its subscriptions, `reflect` will be called only once, with the most-recently-set value.\n\n`arguments` and rest parameters will not receive `old` unless the function's [length](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length) is at least 2.\n\n## Named export: `propertyStore()`\n\n<i>Parameters: `origin` ([store](https://svelte.dev/docs#component-format-script-4-prefix-stores-with-$-to-access-their-values-store-contract)), `propName` (string, number, symbol, or array of strings/numbers/symbols)</i><br>\n<i>Returns a store with [`writable`](https://svelte.dev/docs#run-time-svelte-store-writable) methods</i>\n\nA utility wrapper for `writableDerived`. Given a store containing an object, this function returns a store containing the value of the object's property `propName`. If `propName` is an array, it's used as a path to navigate nested objects.\n\n## Regarding Subscription-less `svelte-writable-derived` Stores\n\nOne of the ways this package emulates the behavior of Svelte's `derived` is that it does not subscribe to any origin store until the derived store itself has a subscription. However, there's an exception: Calling the `set` and `update` methods when the derived store has no subscriptions will subscribe to & then unsubscribe from all its origins.\n\n## Examples\n\n### Making an object store from a JSON string store\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport writableDerived from \"svelte-writable-derived\";\n\nvar jsonStore = writable(`{\"I'm a property\": true}`);\nvar objectStore = writableDerived(\n\tjsonStore,\n\t(json) => JSON.parse(json),\n\t(object) => JSON.stringify(object)\n);\nconsole.log( Object.keys( get(objectStore) ) ); // [\"I'm a property\"]\nobjectStore.set({\"I'm not a property\": false});\nconsole.log( get(jsonStore) ); // \"{\\\"I'm not a property\\\": false}\"\n```\n\n### Making a single-value store from an object store\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport { propertyStore } from \"svelte-writable-derived\";\n\nvar objectStore = writable({\"a horse\": \"a horse\", \"of course\": \"of course\"});\nvar valueStore = propertyStore(objectStore, \"a horse\");\nconsole.log( get(valueStore) ); // \"a horse\"\nvalueStore.set(\"*whinny*\");\nconsole.log( get(objectStore) ); // {\"a horse\": \"*whinny*\", \"of course\": \"of course\"}\n\n// propertyStore is just a wrapper. You could also use writableDerived directly:\n\nimport writableDerived from \"svelte-writable-derived\";\n\nvar valueStore = writableDerived(\n\tobjectStore,\n\t(object) => object[\"a horse\"],\n\t(reflecting, object) => {\n\t\tobject[\"a horse\"] = reflecting;\n\t\treturn object; // needed to call objectStore.set with the proper value\n\t}\n);\n```\n\n#### ... when the object is an array\n\n```javascript\n// An array is an object with numerically-named properties.\n// Access them using a number for the propName parameter.\n\nimport { writable, get } from \"svelte/store\";\nimport { propertyStore } from \"svelte-writable-derived\";\n\nvar treasureCoordinates = writable([7, -2, 31]);\nvar treasureElevation = propertyStore(treasureCoordinates, 1);\nconsole.log( get(treasureElevation) ); // -2\ntreasureElevation.set(1); // dig up the treasure\nconsole.log( get(treasureCoordinates) ); // [7, 1, 31]\n```\n\n#### ... when the value is deeply nested in the object\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport { propertyStore } from \"svelte-writable-derived\";\n\nvar objectStore = writable({ deeply: { buried: { item: \"trash\" } } });\nvar valueStore = propertyStore(objectStore, [\"deeply\", \"buried\", \"item\"]);\nconsole.log( get(valueStore) ); // \"trash\"\nvalueStore.set(\"treasure\");\nconsole.log( get(objectStore) ); // { deeply: { buried: { item: \"treasure\" } } }\n\n// Using writableDerived directly:\n\nimport writableDerived from \"svelte-writable-derived\";\n\nvar valueStore = writableDerived(\n\tobjectStore,\n\t(object) => object.deeply.buried.item,\n\t(reflecting, object) => {\n\t\tobject.deeply.buried.item = reflecting;\n\t\treturn object; // needed to call objectStore.set with the proper value\n\t}\n);\n```\n\n### Making an object store from several single-value stores\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport writableDerived from \"svelte-writable-derived\";\n\nvar valueStore1 = \"sparta\", valueStore2 = \"monty python's flying circus\";\nvar objectStore = writableDerived(\n\t[valueStore1, valueStore2],\n\t([value1, value2]) => ( {\"this is\": value1, \"it's\": value2} ),\n\t(object) => [ object[\"this is\"], object[\"it's\"] ]\n);\nconsole.log( get(objectStore) ); // {\"this is\": \"sparta\", \"it's\": \"monty python's flying circus\"}\nobjectStore.set( {\"this is\": \"rocket league\", \"it's\": \"over 9000\"} );\nconsole.log( get(valueStore1), get(valueStore2) ); // \"rocket league\" \"over 9000\"\n```\n\n### Chaining all of the above together\n\n```javascript\n// What if Rube Goldberg were a JavaScript developer?\nimport { writable, get } from \"svelte/store\";\nimport { writableDerived, propertyStore } from \"svelte-writable-derived\";\n\nvar jsonStore = writable(`{\"owner\": \"dragon\", \"possessions\": [\"crown\", \"gold\"]}`);\nvar hoardStore = writableDerived(\n\tjsonStore,\n\t(json) => JSON.parse(json),\n\t(object) => JSON.stringify(object)\n);\n\nvar hoarderStore = propertyStore(hoardStore, \"owner\");\nvar hoardContentsStore = propertyStore(hoardStore, \"possessions\");\n\nvar itemListStore = writableDerived(\n\t[hoarderStore, hoardContentsStore],\n\t([hoarder, hoardContents]) => {\n\t\treturn hoardContents.map( (item) => {\n\t\t\treturn {item, owner: hoarder};\n\t\t});\n\t},\n\t(itemList) => {\n\t\t// This is only for demonstration purposes, so we won't handle differing owners\n\t\tvar hoarder = itemList[0].owner;\n\t\tvar hoardContents = itemList.map( (itemListEntry) => {\n\t\t\treturn itemListEntry[\"item\"];\n\t\t} );\n\t\treturn [hoarder, hoardContents];\n\t}\n);\n\njsonStore.subscribe(console.log);\nhoardStore.subscribe(console.log);\nhoarderStore.subscribe(console.log);\n// skipping hoardContentsStore\nitemListStore.subscribe(console.log);\nitemListStore.update( (itemList) => {\n\treturn itemList.map( (itemListEntry) => {\n\t\treturn {item: itemListEntry.item, owner: \"protagonist\"};\n\t} );\n} );\n/*\n\tUpon the update, the console logs:\n\t[{item: \"crown\", owner: \"protagonist\"}, {item: \"gold\", owner: \"protagonist\"}]\n\t\"protagonist\"\n\t{owner: \"protagonist\", possessions: [\"crown\", \"gold\"]}\n\t\"{\\\"owner\\\": \\\"protagonist\\\", \\\"possessions\\\": [\\\"crown\\\", \\\"gold\\\"]}\"\n*/\n```\n\n## Browser compatibility\n\nThis package should run anywhere Svelte can run. Use transpilers/polyfills as needed.\n\n# 💖 Support the developer\n\nI muchly appreciate any way you'd like to show your thanks - knowing people are helped gives me warm fuzzies and makes it all worthwhile!\n\n## 💸 ... with money\n\nAt [my Ko-Fi page](https://ko-fi.com/pixievoltno1), you can make a one-time or monthly donation, or [commission work on an issue](https://ko-fi.com/pixievoltno1/commissions).\n\n## 💌 ... with kind words\n\nCurrent contact info is on [this page](https://pixievoltno1.com/contact/) - or you can create an \"issue\" on this repo just to say thanks! Thank-you \"issues\" will be closed right away, but are treasured regardless~\n\n## 🤝 ... with a job\n\nWant me to sling some JavaScript for you? [Look over my other work](https://github.com/PixievoltNo1) and [contact me!](https://pixievoltno1.com/contact/)","readmeFilename":"README.md","gitHead":"3c46caa951dcc9295cb20c0d0563c1ef95e4a45f","_id":"svelte-writable-derived@3.0.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.3","dist":{"integrity":"sha512-zBWCS5c3MA9o4NT/UJHP3KoPOhtmH2ZQ/QRK31w9LzLdPP7MNncUcBGIu4iH2RVt17iRfR6agm7nEqwNvsYuMw==","shasum":"34b8945d1aee20168d2a86d8e46a7b80b6ffbcd9","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-3.0.1.tgz","fileCount":5,"unpackedSize":21573,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHjye8cTUA2WrDWI/xZQerzFoNgV+w+sqWnssajxosVoAiBReGF0ljydHshnTjGPwlR4ISg2cdxmHVMAs/80LgRiGg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjp+1ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBWg//QSUMqt2KnlxBRjKuG9cpOnqK1/8HgKhdjd6oN9WB3FQWDYDF\r\n4WPZGtn3hrHPRWBSmM6UTt6oP1RqWhZv3j1VDkhj0zHUSyT2VC3bnA5/IckR\r\naDlJHUNYUAP//VG1T0eC/hqpVp23iPkA0hWS6UKhn6EwupaJYGgU0qXdblJw\r\nGlhgOf7LnCD1S51Fb9mDpq/BLUfSxYS/lve4KhFK6DDR3eAHTQ4a52b6S/Jw\r\nwrnRKBBnS0YTs5P8wkfj3inCh+J82Kx/bg1s+//IxjY83SSTCtxUeWLJBcdy\r\nVJ8z5RiSu8UHFwKr8pzQMLtMeaEw28TwSlD72zL9DuXrGU4kWBlrRubm4FoA\r\neBVoO+DtY4IYXKtfW2zvbTHiWzfqyqNHViNUIhs3RTiR/mIMqLL5pcfmOICl\r\nTkU4CrYZJRJY5/Ra26dj1ZnuNKjhJHcBHYwWPDtOlQVd4o64scIIz8fGkJIi\r\n4LCgA7EhU4VMz6wD4WGuUVWPIBoCCLHvvgIaA+KUF7VSZA1vO8WzawFJ/Ku9\r\nYRyM1UQw1m89uA4+AaZ3oMbQm5ggAEqRFLvU4jcApE+0+S9OOBrzNquSs7fb\r\nnatUphZsSXxXAafiseZYomQJ35dJY/d/92UU8mWz7/ohXUuQaqTrcljMc+rf\r\nfVmbhWE+3TYq6Xae46e3bXSOo3AnETTtGB8=\r\n=z53X\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_3.0.1_1671949656844_0.502741595967495"},"_hasShrinkwrap":false},"2.1.6":{"name":"svelte-writable-derived","version":"2.1.6","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","derived","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://ko-fi.com/pixievoltno1","module":"index.mjs","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.mjs"},"./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha test.mjs","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1"},"devDependencies":{"mocha":"^9.2.2","svelte":"^3.54.0"},"license":"MIT","gitHead":"2d9e9b4744c4697e36a593b1668769676916a731","_id":"svelte-writable-derived@2.1.6","_nodeVersion":"16.13.2","_npmVersion":"8.1.3","dist":{"integrity":"sha512-vqOXuiESMZyP/kt/RD+nOk2RVHNakDm1K1hmfeGAKc4jzcSp5hEkUi43MDbkVlMurkSBlcMVTQwRQy4LcBT2lw==","shasum":"973426e89835fbc5cac5eea8cc747a8152f544de","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-2.1.6.tgz","fileCount":5,"unpackedSize":24852,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQA8jh4QX8yE/AtDLOYEZV2ac6zjRoS2pAiZjtEqLW2wIhAPIUnlEIW9CfBk3hfIrqsGDG6EmExEaL2fovHDP2+9oX"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjp/HSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBbg/9EeGZVaHamP1psm9cgTf+wIjDsfNNqE5Opodr1i4M7NWrTTcX\r\nohiokBK+SeokEEsHhZ6pq/JyUYDm9DQ75/KBU/alohmDjvyDoigov6dfqxvl\r\nYKU2WKJpe1OgGe4O6GLthFKWA0VvqzfHFACFqNaGylUXGteqKFSXD5OYvGBs\r\nABCZWg/saUOucQ5kOKfYqCjzZQ3uMc6qOQqJr4yzPGCBxUzbbag//mrgxXMO\r\nnAFGk2DZvK6F15xowcDpKLk+3hpY4Nq2OwUYufWhndFTq5rUxtVn+iPd6aoW\r\n97dsgTTMuzl8FVTeavRVBKCSH5JFdZTbIDMvQujqAhbJME82dNt0g6/olffB\r\n3G2GRho6//inOBQA/SG0NPtMeqNTT6vccpAqV3oqpfb7Z5Fd/0XSLVvYfdP1\r\n21JZr/az6VrY78MNPtQW/irTheWw42QNrymqD+gZMtC2DBlvonwe4D7/Fsks\r\nK1zafGKu5YBMqg345Gqx0UXUAlJQ45+MbfjVQj1jyP94+HBQtuAoSkLND4bW\r\nhJwrLZF7szB2qczw9pF3fFG1YpLAWNTqP9sG3B0LZb86d+hV83FRMPLs2Rrz\r\nfHNJ7UbzLQgfKXY8oy6yUqO5WfgUxIRV/SGNXtI3J1KL2bA2pDxKzGbL7HlN\r\n7wDB4uIe2RZjYejpFdhKAYCCVpczh+B5IJM=\r\n=sZ6O\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_2.1.6_1671950802416_0.7625183841718222"},"_hasShrinkwrap":false},"3.1.0":{"name":"svelte-writable-derived","version":"3.1.0","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","svelte4","derived","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://ko-fi.com/pixievoltno1","module":"index.mjs","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.mjs"},"./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1 || ^4.0.0-next.1"},"devDependencies":{"mocha":"^9.2.2","svelte":"file:test/svelte-proxy","svelte3":"npm:svelte@^3.59.1","svelte4":"npm:svelte@^4.0.0-next.1"},"license":"MIT","gitHead":"44ce00b317ee2f3e2bcac93f48481ccf4f884074","_id":"svelte-writable-derived@3.1.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.3","dist":{"integrity":"sha512-cTvaVFNIJ036vSDIyPxJYivKC7ZLtcFOPm1Iq6qWBDo1fOHzfk6ZSbwaKrxhjgy52Rbl5IHzRcWgos6Zqn9/rg==","shasum":"ea114125805a9d18398577f2431d1e8cdd4d8d69","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-3.1.0.tgz","fileCount":5,"unpackedSize":21945,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8gZb0k06xiGFEV8ewO5mMUir7hdbG0tIZmsM2eWnM1AIhAIbX+062Y/qXqQ0fVb7n/d45JreCeDh5ekogolXC7VJ1"}]},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_3.1.0_1686727516571_0.2201550022707015"},"_hasShrinkwrap":false},"3.1.1":{"name":"svelte-writable-derived","version":"3.1.1","description":"Two-way data-transforming stores for Svelte","keywords":["svelte","svelte3","svelte4","svelte5","derived","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"},"funding":"https://ko-fi.com/pixievoltno1","module":"index.mjs","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.mjs"},"./package.json":"./package.json"},"sideEffects":false,"scripts":{"test":"mocha","prepublishOnly":"npm test"},"peerDependencies":{"svelte":"^3.2.1 || ^4.0.0-next.1 || ^5.0.0-next.94"},"devDependencies":{"mocha":"^10.4.0","svelte":"file:test/svelte-proxy","svelte3":"npm:svelte@^3.59.2","svelte4":"npm:svelte@^4.2.12","svelte5":"npm:svelte@^5.0.0-next.94"},"license":"MIT","_id":"svelte-writable-derived@3.1.1","gitHead":"cc6bf0a8d3253b3024534829016c9a4b88be83c6","_nodeVersion":"21.7.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-w4LR6/bYZEuCs7SGr+M54oipk/UQKtiMadyOhW0PTwAtJ/Ai12QS77sLngEcfBx2q4H8ZBQucc9ktSA5sUGZWw==","shasum":"03222b32f8a66ea503e95b3cce8b94bec0810044","tarball":"https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-3.1.1.tgz","fileCount":5,"unpackedSize":22021,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChR7PRi99O1hqtpyInDQAJorNqgKMaeDYe3QIbnmr6WAIgOpInI48xHrB40DD8bDRizW1cdeJ5HHSKQ9ttz9G68q4="}]},"_npmUser":{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"},"directories":{},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-writable-derived_3.1.1_1712213701935_0.7558318272627749"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-02T23:17:22.208Z","1.0.0-rc.1":"2019-06-02T23:17:22.342Z","modified":"2024-04-04T06:55:02.278Z","1.0.0":"2019-06-02T23:23:04.269Z","1.0.1":"2019-06-08T00:03:24.728Z","2.0.0":"2019-06-13T10:37:59.000Z","2.0.1":"2019-06-14T10:33:24.434Z","2.1.0":"2020-07-25T06:07:11.767Z","2.1.1":"2020-11-23T05:03:57.493Z","2.1.2":"2021-11-14T09:03:02.688Z","2.1.3":"2022-03-21T01:06:49.006Z","2.1.4":"2022-06-22T09:14:51.246Z","2.1.5":"2022-07-04T01:36:41.518Z","3.0.0":"2022-12-25T05:54:03.860Z","3.0.1":"2022-12-25T06:27:37.027Z","2.1.6":"2022-12-25T06:46:42.604Z","3.1.0":"2023-06-14T07:25:16.718Z","3.1.1":"2024-04-04T06:55:02.096Z"},"maintainers":[{"name":"pixievoltno1","email":"pixievoltno1+npm@gmail.com"}],"description":"Two-way data-transforming stores for Svelte","homepage":"https://github.com/PixievoltNo1/svelte-writable-derived","keywords":["svelte","svelte3","svelte4","svelte5","derived","store"],"author":{"name":"Pixievolt No. 1","url":"https://pixievoltno1.com"},"bugs":{"url":"https://github.com/PixievoltNo1/svelte-writable-derived/issues"},"license":"MIT","readme":"# svelte-writable-derived\n[![npm](https://img.shields.io/npm/v/svelte-writable-derived.svg)](https://www.npmjs.com/package/svelte-writable-derived)\n[![Bundle size](https://img.shields.io/bundlephobia/minzip/svelte-writable-derived.svg)](https://bundlephobia.com/result?p=svelte-writable-derived)\n[![GitHub CI Status](https://img.shields.io/github/actions/workflow/status/PixievoltNo1/svelte-writable-derived/node.js.yml?branch=master&label=tests)](https://github.com/PixievoltNo1/svelte-writable-derived/actions/workflows/node.js.yml)\n[![License](https://img.shields.io/github/license/PixievoltNo1/svelte-writable-derived.svg)](https://github.com/PixievoltNo1/svelte-writable-derived/blob/master/LICENSE.txt)\n![GitHub Repo stars](https://img.shields.io/github/stars/PixievoltNo1/svelte-writable-derived?style=social)\n\nFor users of [Svelte](https://svelte.dev/) v3 and v4, this is a read-write variant of Svelte's [derived stores](https://svelte.dev/tutorial/derived-stores) that accepts an extra callback to send values back to the source. It builds on the derived & writable stores provided by Svelte, and emulates their behavior as closely as possible.\n\nThis project has a [Code of Conduct](CODE_OF_CONDUCT.md). By participating in the Git repo or issues tracker, you agree to be as courteous, welcoming, and generally a lovely person as its terms require. 😊\n\n<!-- Table of contents generated mostly by the markdown-toc package - however, it includes emoji in the URLs, and they need to be stripped for GitHub -->\n\n<!-- toc -->\n\n  * [Default & named export: `writableDerived()`](#default--named-export-writablederived)\n    + [New parameter: `reflect`](#new-parameter-reflect)\n  * [Named export: `propertyStore()`](#named-export-propertystore)\n  * [Regarding Subscription-less `svelte-writable-derived` Stores](#regarding-subscription-less-svelte-writable-derived-stores)\n  * [Examples](#examples)\n    + [Making an object store from a JSON string store](#making-an-object-store-from-a-json-string-store)\n    + [Making a single-value store from an object store](#making-a-single-value-store-from-an-object-store)\n      - [... when the object is an array](#-when-the-object-is-an-array)\n      - [... when the value is deeply nested in the object](#-when-the-value-is-deeply-nested-in-the-object)\n    + [Making an object store from several single-value stores](#making-an-object-store-from-several-single-value-stores)\n    + [Chaining all of the above together](#chaining-all-of-the-above-together)\n  * [Browser compatibility](#browser-compatibility)\n- [💖 Support the developer](#-support-the-developer)\n  * [💸 ... with money](#--with-money)\n  * [💌 ... with kind words](#--with-kind-words)\n  * [🤝 ... with a job](#--with-a-job)\n\n<!-- tocstop -->\n\n## Default & named export: `writableDerived()`\n\n<i>Parameters: `origins` ([store](https://svelte.dev/docs#component-format-script-4-prefix-stores-with-$-to-access-their-values-store-contract) or array of stores), `derive` (function), [`reflect`](#new-parameter-reflect) (see documentation), optional `initial` (any)</i><br>\n<i>Returns a store with [`writable`](https://svelte.dev/docs#run-time-svelte-store-writable) methods</i>\n\nCreate a store that behaves similarly to [Svelte's `derived`](https://svelte.dev/docs#run-time-svelte-store-derived), with `origins`, `derive`, and `initial` working like its 1st, 2nd, and 3rd parameters respectively. Values introduced to the store via its `set` and `update` methods are passed to the new 3rd parameter, `reflect`, which can in turn set values for the origin stores.\n\nAs long as `derived` and `reflect` set stores only by the means provided to them and not via any store's methods, they won't trigger calls to each other.\n\n### New parameter: `reflect`\n\n<i>Function with parameters: `reflecting` (any), optional `old` (any)</i>\n\nThis function is called when the derived store gets a new value via its `set` and `update` methods (not via the `derive` callback). Its `reflecting` parameter is this new value, and `old` is the origin store's current value, or an array of values if `origins` is an array. It must return a value to set in the origin store, or an array of values to set if `origins` was an array. If the returned array is sparse or shorter than `origins`, it will only set the stores it has elements for, and other stores don't necessarily need to be writable.\n\n`reflect` is called after the derived store's subscriptions are called. If the derived store has its `set` and/or `update` methods called again in the process of calling its subscriptions, `reflect` will be called only once, with the most-recently-set value.\n\n`arguments`, default parameters, and rest parameters will not receive `old` unless the function's [length](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length) is at least 2.\n\n## Named export: `propertyStore()`\n\n<i>Parameters: `origin` ([store](https://svelte.dev/docs#component-format-script-4-prefix-stores-with-$-to-access-their-values-store-contract)), `propName` (string, number, symbol, or array of strings/numbers/symbols)</i><br>\n<i>Returns a store with [`writable`](https://svelte.dev/docs#run-time-svelte-store-writable) methods</i>\n\nA utility wrapper for `writableDerived`. Given a store containing an object, this function returns a store containing the value of the object's property `propName`. If `propName` is an array, it's used as a path to navigate nested objects.\n\n## Regarding Subscription-less `svelte-writable-derived` Stores\n\nOne of the ways this package emulates the behavior of Svelte's `derived` is that it does not subscribe to any origin store until the derived store itself has a subscription. However, there's an exception: Calling the `set` and `update` methods when the derived store has no subscriptions will subscribe to & then unsubscribe from all its origins.\n\n## Examples\n\n### Making an object store from a JSON string store\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport writableDerived from \"svelte-writable-derived\";\n\nvar jsonStore = writable(`{\"I'm a property\": true}`);\nvar objectStore = writableDerived(\n\tjsonStore,\n\t(json) => JSON.parse(json),\n\t(object) => JSON.stringify(object)\n);\nconsole.log( Object.keys( get(objectStore) ) ); // [\"I'm a property\"]\nobjectStore.set({\"I'm not a property\": false});\nconsole.log( get(jsonStore) ); // \"{\\\"I'm not a property\\\": false}\"\n```\n\n### Making a single-value store from an object store\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport { propertyStore } from \"svelte-writable-derived\";\n\nvar objectStore = writable({\"a horse\": \"a horse\", \"of course\": \"of course\"});\nvar valueStore = propertyStore(objectStore, \"a horse\");\nconsole.log( get(valueStore) ); // \"a horse\"\nvalueStore.set(\"*whinny*\");\nconsole.log( get(objectStore) ); // {\"a horse\": \"*whinny*\", \"of course\": \"of course\"}\n\n// propertyStore is just a wrapper. You could also use writableDerived directly:\n\nimport writableDerived from \"svelte-writable-derived\";\n\nvar valueStore = writableDerived(\n\tobjectStore,\n\t(object) => object[\"a horse\"],\n\t(reflecting, object) => {\n\t\tobject[\"a horse\"] = reflecting;\n\t\treturn object; // needed to call objectStore.set with the proper value\n\t}\n);\n```\n\n#### ... when the object is an array\n\n```javascript\n// An array is an object with numerically-named properties.\n// Access them using a number for the propName parameter.\n\nimport { writable, get } from \"svelte/store\";\nimport { propertyStore } from \"svelte-writable-derived\";\n\nvar treasureCoordinates = writable([7, -2, 31]);\nvar treasureElevation = propertyStore(treasureCoordinates, 1);\nconsole.log( get(treasureElevation) ); // -2\ntreasureElevation.set(1); // dig up the treasure\nconsole.log( get(treasureCoordinates) ); // [7, 1, 31]\n```\n\n#### ... when the value is deeply nested in the object\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport { propertyStore } from \"svelte-writable-derived\";\n\nvar objectStore = writable({ deeply: { buried: { item: \"trash\" } } });\nvar valueStore = propertyStore(objectStore, [\"deeply\", \"buried\", \"item\"]);\nconsole.log( get(valueStore) ); // \"trash\"\nvalueStore.set(\"treasure\");\nconsole.log( get(objectStore) ); // { deeply: { buried: { item: \"treasure\" } } }\n\n// Using writableDerived directly:\n\nimport writableDerived from \"svelte-writable-derived\";\n\nvar valueStore = writableDerived(\n\tobjectStore,\n\t(object) => object.deeply.buried.item,\n\t(reflecting, object) => {\n\t\tobject.deeply.buried.item = reflecting;\n\t\treturn object; // needed to call objectStore.set with the proper value\n\t}\n);\n```\n\n### Making an object store from several single-value stores\n\n```javascript\nimport { writable, get } from \"svelte/store\";\nimport writableDerived from \"svelte-writable-derived\";\n\nvar valueStore1 = \"sparta\", valueStore2 = \"monty python's flying circus\";\nvar objectStore = writableDerived(\n\t[valueStore1, valueStore2],\n\t([value1, value2]) => ( {\"this is\": value1, \"it's\": value2} ),\n\t(object) => [ object[\"this is\"], object[\"it's\"] ]\n);\nconsole.log( get(objectStore) ); // {\"this is\": \"sparta\", \"it's\": \"monty python's flying circus\"}\nobjectStore.set( {\"this is\": \"rocket league\", \"it's\": \"over 9000\"} );\nconsole.log( get(valueStore1), get(valueStore2) ); // \"rocket league\" \"over 9000\"\n```\n\n### Chaining all of the above together\n\n```javascript\n// What if Rube Goldberg were a JavaScript developer?\nimport { writable, get } from \"svelte/store\";\nimport { writableDerived, propertyStore } from \"svelte-writable-derived\";\n\nvar jsonStore = writable(`{\"owner\": \"dragon\", \"possessions\": [\"crown\", \"gold\"]}`);\nvar hoardStore = writableDerived(\n\tjsonStore,\n\t(json) => JSON.parse(json),\n\t(object) => JSON.stringify(object)\n);\n\nvar hoarderStore = propertyStore(hoardStore, \"owner\");\nvar hoardContentsStore = propertyStore(hoardStore, \"possessions\");\n\nvar itemListStore = writableDerived(\n\t[hoarderStore, hoardContentsStore],\n\t([hoarder, hoardContents]) => {\n\t\treturn hoardContents.map( (item) => {\n\t\t\treturn {item, owner: hoarder};\n\t\t});\n\t},\n\t(itemList) => {\n\t\t// This is only for demonstration purposes, so we won't handle differing owners\n\t\tvar hoarder = itemList[0].owner;\n\t\tvar hoardContents = itemList.map( (itemListEntry) => {\n\t\t\treturn itemListEntry[\"item\"];\n\t\t} );\n\t\treturn [hoarder, hoardContents];\n\t}\n);\n\njsonStore.subscribe(console.log);\nhoardStore.subscribe(console.log);\nhoarderStore.subscribe(console.log);\n// skipping hoardContentsStore\nitemListStore.subscribe(console.log);\nitemListStore.update( (itemList) => {\n\treturn itemList.map( (itemListEntry) => {\n\t\treturn {item: itemListEntry.item, owner: \"protagonist\"};\n\t} );\n} );\n/*\n\tUpon the update, the console logs:\n\t[{item: \"crown\", owner: \"protagonist\"}, {item: \"gold\", owner: \"protagonist\"}]\n\t\"protagonist\"\n\t{owner: \"protagonist\", possessions: [\"crown\", \"gold\"]}\n\t\"{\\\"owner\\\": \\\"protagonist\\\", \\\"possessions\\\": [\\\"crown\\\", \\\"gold\\\"]}\"\n*/\n```\n\n## Browser compatibility\n\nThis package should run anywhere Svelte can run. Use transpilers/polyfills as needed.\n\n# 💖 Support the developer\n\nI muchly appreciate any way you'd like to show your thanks - knowing people are helped gives me warm fuzzies and makes it all worthwhile!\n\n## 💸 ... with money\n\nAt [my Ko-Fi page](https://ko-fi.com/pixievoltno1), you can make a one-time or monthly donation, or [commission work on an issue](https://ko-fi.com/pixievoltno1/commissions).\n\nYou can also support *all* your dependencies at once using [StackAid](https://www.stackaid.us/)!\n\n## 💌 ... with kind words\n\nCurrent contact info is on [this page](https://pixievoltno1.com/contact/) - or you can create an \"issue\" on this repo just to say thanks! Thank-you \"issues\" will be closed right away, but are treasured regardless~\n\n## 🤝 ... with a job\n\nWant me to sling some JavaScript for you? [Look over my other work](https://github.com/PixievoltNo1) and [contact me!](https://pixievoltno1.com/contact/)","readmeFilename":"README.md","repository":{"type":"git","url":"git+https://github.com/PixievoltNo1/svelte-writable-derived.git"}}