{"_id":"@animus-bi/redxs","_rev":"90-773e5fd2690ff3e91091fc44580cfef3","name":"@animus-bi/redxs","dist-tags":{"beta":"0.0.1-beta.28","latest":"1.0.1","d6ecd1582c607376e1ace1878eadb8d5841d2c26":"0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.1","44b6d8236582d8135d51bf1be05c628e0f5a31ff":"0.0.1-44b6d8236582d8135d51bf1be05c628e0f5a31ff.0","bf8c1b39":"0.0.1-bf8c1b39.1","1491714b":"0.0.1-1491714b.23","b27e0336":"0.0.1-b27e0336.4","6c28ce2c":"0.0.1-6c28ce2c.4","2573bc61":"0.0.1-2573bc61.0","cce6464f":"0.0.1-cce6464f.0","5f8affa4":"0.0.1-5f8affa4.0"},"versions":{"0.0.1-beta.1":{"name":"@animus-bi/redxs","version":"0.0.1-beta.1","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","deploy":""},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"fd8e30b48bf37db1ff888ae5794f0e8f5412aebc","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.1","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-qWffcvB71sGGh9+/VDs/aJRDZRp4FFdzOqyXndj4IHEJ55jK9buyQ3BEaA8qCg5hIGiIXG5esumlR4tOBmVM2A==","shasum":"deb68af16cca2debba72881d10351d7e08015bba","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.1.tgz","fileCount":37,"unpackedSize":212666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6gNiCRA9TVsSAnZWagAAoe0P/ibqamoM5wKEnNG8KDk8\neCHvR7La0Thoa7BGyHu2am5rNJxBDDlIyxkozTWVQXnRUSu0hGx8LeJJS9c/\nnqFnUdLNXcgiEkuvPeZEksyQ7AxczSR728OoQ4unMrWO9+/0+Xlf3lURwdZA\nO8Q9be86Vo1a8gMdH6yU7uz6JCe1JUjtDSQ0Z/kT7NP37Rg04ZdUbSBJbKZG\n29lQ5N2n7JrQ+7LBFXpHJHA8GMfsLMVbZ83jHLsTu90PQ19h1UdcuSWF3GD8\n5EgiQrMp8i2EeOvoUqRbVchaZsSlJDGROlyJmWyjMCDhogam2WEnksHyjdWx\nbfs5Leut53fo0b2RLG/aunCN/X1nyPN8xOEUyFfD5W6Q/pnoGDlreEGz+5rQ\nP1GGcGswksaoFYltYVcpC5NpA9mZ/M/qPabRqnuDYblII5ErO0orpfH8LLcp\n4/L3uwnPq5sF1uAwMzgcT0OTkV4e0Qvtf9PB3npvGi1IGWxEgUXISerT3nxC\nx2Ejgvu4A2x5LJ3QWt9G2tJlKIO/gJ3wdByuwcSMjS1GtZsiOb8sekoly/8z\nihJMKtlS3/i7i/FDa7b69F9TwgMWWv98yM0s23oKc4WYqi2npgFGcXNG1NBK\nVSXu9zedByIGudb0a47TPTHSWKgPWNGsnLHkrdLQOedSVh/9anudj0FpPOnc\nVduq\r\n=f5iS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA35DKiHClOugDcWwqTq/mI79Q1mTs/9NEpclTlzGiH7AiBv7IZO0WNUQbxHJLQbpJMqOPRnnEbTrEKF5Bd3qg1naA=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.1_1609171810052_0.7751067040114861"},"_hasShrinkwrap":false},"0.0.1-beta.2":{"name":"@animus-bi/redxs","version":"0.0.1-beta.2","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","deploy":""},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> An extremely light redux implementation for any occasion","readmeFilename":"README.md","gitHead":"fd8e30b48bf37db1ff888ae5794f0e8f5412aebc","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.2","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-Vc6KbygfrfwjQzvOFRkr7FjVoPEWjBul9vKuQRoK/mSCNwWtH7r2gn/syla9jFz77YpRHlQGaZWEcokhDcQBkg==","shasum":"b595217b3ce3cf180ca732a5722576252d6817f7","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.2.tgz","fileCount":37,"unpackedSize":212666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6gOICRA9TVsSAnZWagAArHEP/3R4/2MqQZsfJXJ+0gsP\nJZngRBcuDURzGeAB7PaPD/UZvLIfO3cpTsv6rEo59I5dGi39HEyEzZmp3ERL\nQfoEVN2LyYH55inokaxOzCVJvmj6wK92Yd6b7Fi0hp6LZ8Y0lLwSN7D9vor7\nw+c0eCRHYedDRw9EYo2FbTwLwsbRm9c+yDXkdeAysf5PB/8OSoJf/LsZEatp\n00oWoZ+HNkvxa08P071ZZgMuYSwosjtcjxCHjGAbEku2X/asPihyvcOHH+DE\nYxhXdczDubRpaxATgbnlftiuD1NTbV1fR3wwu9oyYijzBur6giD/YdCtS/j5\nowl0G1SGJ6SKTqkbZqnZaaX4udX9sEmavF2aKMecAeOdtPXeKbQS0hvot7t3\nJZOKkDmWpBaHEGguRP7wC3S+Qyh+vveNfh86U/IPqav4cwd7aLfi+15qUTrI\nCzSLbOmYr94/g/sEae2fOfGqqX3O4+S6Q+kznH6ZNWbM0VgBiHvHGf9z34LA\nHDz309DiNHo3SKPxgNJGaQ1V2ZW4wK8Qym5cozBfRP02HQRfBZoP1bP4nSC2\nz5xN0nhMadhzjxRxbnd3OXX2PKuZWmQHh9NC+hkEUFb6LwYUXXLQwlfT/z7I\nNNHAkS6MVrGHudq11Al7a4LG+icMlescPhTtWRBEJmHWuWVyls3jWJilZmLZ\n5OuV\r\n=yoyv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQmwTGNHzxahgk5km2CSCOM7Lg+4cryJJPbU/LRfQkmAiEA97Wd/3J/C1Qud+Q2df6nfLxacZdU8xeMzVBsR+4+rEg="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.2_1609171847633_0.7099433896539684"},"_hasShrinkwrap":false},"0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.0":{"name":"@animus-bi/redxs","version":"0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:beta":"npm version prerelease --preid $(git rev-parse HEAD --short=8) --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag $(git rev-parse HEAD --short=8) --access public"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> An extremely light redux implementation for any occasion","readmeFilename":"README.md","gitHead":"d6ecd1582c607376e1ace1878eadb8d5841d2c26","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.0","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-DYW6dl4iUpzQMrUba/eWL4KNanzNNgU8a+6F7r+iWZ/M/UzJeMBHf2TEZ4nJElKGzqHxN/7aLsR1zRD1DBKC7A==","shasum":"737f793a65c1bd62839b44d425e4b8eb6c62fe95","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.0.tgz","fileCount":37,"unpackedSize":212738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6gxbCRA9TVsSAnZWagAA9aoP/iZARKNGtRIjkhz5QVIV\nw0XPkIJFA8Vhk1iRXgZ6MN2/YZBdDHGgtrFfWTLmjLvHl7dZIGOfNuetS4/W\nSQMPGOBAyAsoZ62yM1bfhJLln+5t7pckvOlLfQdKYR/Aj6XYh6k4iSioFiJo\nRJ9XnJafQP9ZfNdagsXXsW5jIxDnqLx6yaDi0TAkg+ZloQaICRhor3xt5iPp\nOrMN6IEXzYtvmPV4eVKJIEgPZwutYT/R5VTqNDuMWfsH0mTWxy5oSbNnRL9G\nhLBPhy0JUAhzl1INEGvJupmybO2h3aTkGgnoDwC44oomZVVqW3iNicfqJh79\ns8jLDFJ84oSdV52l1LctLLj9OlcG7CL412D7rrRvMYXcnWPVKJJ2UZ8MoTVJ\nYuBdu1PHCc1BvXwZioKkNhfE03dU6I09A7F+6RrbtcxsCrRDPE/diGu8J//A\nGwVjw7BPJsRb/day6yVGX57Rg2M1Or5bWzAA1YTPsJIWkoKaPPd3aCkKliXq\ndHoHNpqaAUjWMqP/2avKHxLkWCMh63aO4KUHADNFMP2sAGpynbYFiPcWhQKF\n+SN06VavvM6ivLlk/Q3Wz/welLmLbviip/yCUSXJQPnP7YQ81rfvJjje8EEv\n4YXzcLZpbNh8pA7t8th9ykE1iugNunaSjDL8vLaT1tbkwosKDUZDn7CmV2B/\n+LQl\r\n=38lL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFC4yFIo4yB+M9zudngg+U35/CL1rgP1Xs1+Nxf1dYWvAiEA2U8JveM294tHL1Zl7YByfI3io2/94a0zNweZbX5hBR0="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.0_1609174106625_0.4106200143844141"},"_hasShrinkwrap":false},"0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.1":{"name":"@animus-bi/redxs","version":"0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.1","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:beta":"npm version prerelease --preid $(git rev-parse HEAD --short=8) --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag $(git rev-parse HEAD --short=8) --access public"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> An extremely light redux implementation for any occasion","readmeFilename":"README.md","gitHead":"d6ecd1582c607376e1ace1878eadb8d5841d2c26","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.1","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-Mb2jm0z6Wnpj4soMHAeMFX3kYRPnV6DZ7pCtx3Ut4bOY4hKMYML8FmC7baU9VblisFTK+2kX2kteEj0Z2AdMhg==","shasum":"e36ac666b9cab402d7229a5da4bb1123556b664b","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.1.tgz","fileCount":37,"unpackedSize":212738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6g/fCRA9TVsSAnZWagAA0CEQAJ6FEjnh/OoqL6Oi9OaR\n5cPbU0u2lWxYVFYx71LvMthaCETwkWMujsdwn6OJm6/CZaFANeBFSrtV0lKY\nAwlUI1FkVVWypJU8KI2HKAfU0sQzqj7b1R2pKZrfb7nCpqRoVvHICKR9dck1\nt2b9Pgb0rBb5TY4libQzqGtlsFKawGIF2zRglnD1Btx9mm6FSAM4W/dWM6jd\nZ8qhVK/qHSENNt71G1QUkU+rQiB1yqDBkDWSXviKYUUK6GHdQAu+kbEcljXh\nCNrC0ac1auNfiPT/4mrVZXbXSDQj6hZbTC7l3RqZTQ4VE09kkUW/4dk9OImc\nzp6dFkhDPhDw2gBLCJ6kByFVz5vjT2Sbfq8m+7xLK/gXZ6I+SJzB2wIKfuV0\nUhUIfrPsgCI4qb9/m03kOPoU35eei1DpgH7UtV/KqtcPbBwvtPB7wS2REQUD\ntn2msAHfU8Hekm6uDzfD1Ux6DZ/61sRASE25NuKq7v3gFIy30b4Us/ryC/BV\nTKPwOpGL5TyKwqAwls5Ix98uCECFI6oV6c3zNVcK/02bS01JYdi8tr8Jxw+8\nhHScKR5lGkslbjnLW0LhoN7TI+DA5163seGYGt3ugoRaGWj+VrNVpOx9L/l1\ntGP59HWhH+wF3DqC9Cx3fss+7VOKUjZE6AArK8dHuziQnWxnn/wEWEMMUiNS\ncm1T\r\n=I58p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICa/BioNktkr98l9AYCpH8lO98dZt2nXi7sYcOnX8G91AiBt0fc3dU7Q08Egw4WvRjBL6768p/IHFhc+zJ5NWItPZw=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.1_1609175006847_0.11090030142714769"},"_hasShrinkwrap":false},"0.0.1-44b6d8236582d8135d51bf1be05c628e0f5a31ff.0":{"name":"@animus-bi/redxs","version":"0.0.1-44b6d8236582d8135d51bf1be05c628e0f5a31ff.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:beta":"npm version prerelease --preid $(git rev-parse HEAD --short=8) --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag $(git rev-parse HEAD --short=8) --access public"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> An extremely light redux implementation for any occasion","readmeFilename":"README.md","gitHead":"44b6d8236582d8135d51bf1be05c628e0f5a31ff","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-44b6d8236582d8135d51bf1be05c628e0f5a31ff.0","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-3fmj9Ybc7Pd85Nv67n9xg9SQ7SMHM0f0StCpWmw5viWfsKPmB09UiSQ7bHiKG3gyjLiY+3qdOIQH7BeqqC731Q==","shasum":"d88207adfcbc1650c4ed383b8c7fe7d75b45cbf6","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-44b6d8236582d8135d51bf1be05c628e0f5a31ff.0.tgz","fileCount":40,"unpackedSize":213706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6hH8CRA9TVsSAnZWagAAOEcP/16466rKJSqgIWx/B/Ro\nsjLVurB437INaYlY3mdipW5gqFbx7eo10Y7l2A9vHCCAB569mGrrvwa0AK3n\n3qDGVS1Q6GgIFvIElGcwyA/Q35Qr6cDVS2E+D2tX4ZB8cflsklxrubx2+qIt\ncDawXak1uj+NIb4Guo0pRrqjTqd77IvCnyu94MkG2ywv6dLpWYrVeDSVE/rJ\nj9tj9OwYkNL8YWGZTTuzbt1gtteWD4lGbF88yCFT9J5ldWMv5z8UuV9Nhdmf\nAnNnfMcP4wuMbkrUpX/99AH99ofD1nlqEHGcGN6tro8vD7QAQRFnmX5yibHn\n4hbzd/3tZaqu2aw3CokQbgh9DioCIuHtEVX/nAZjbwexK07Dm+LwFu9o2i/I\nxCezyodcZcJdPbOuqRWSgdGQtn7d0rsAPKiYgWphZTkHhgb0v9X77KeBYLT4\nouVq8UW77FZzzlfM9o4GLOPyMe92yNS84BcmzQOaa6/kRftdz0foPGICDRAj\nP3mNrgzd5cEFNlPWHxrYT1M4DR63V4yxsgDII2bAu4CLJQsnaaVse+jfjd2X\nAw4+a1uwZTldofJD0vWn3jsSAci4k2Qy2aUZrhIdBDxesfMIlB1ox9EV8MAW\nVZQyx1CyNpWE6AIDLG48CDXKnHpwOPEYx02Dn4lVrbk+xxCElQ+uFzrpO7Jm\nYy8c\r\n=Kzej\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGpkkdGgmFZO/7a3xQEEK1cOBVUv7IEBNx+jCYBZP2ADAiAE1hDepUI2AwMCE5RmVmv+WHt3+U57FSc7VYq6LVyOfQ=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-44b6d8236582d8135d51bf1be05c628e0f5a31ff.0_1609175547867_0.6498845808433018"},"_hasShrinkwrap":false},"0.0.1-bf8c1b39.0":{"name":"@animus-bi/redxs","version":"0.0.1-bf8c1b39.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:beta":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> An extremely light redux implementation for any occasion","readmeFilename":"README.md","gitHead":"44b6d8236582d8135d51bf1be05c628e0f5a31ff","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-bf8c1b39.0","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-9TaYLt3uRYRlGmUCa1M2GoAtjCI/Ko0M2hcD6Wy1qs0uXarfPUhIF0tY7FVwt0w+5+70G25zod5J2wvMD79iCA==","shasum":"8df5006a7b7967061137d7a3a7fcb56b907c1e87","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-bf8c1b39.0.tgz","fileCount":40,"unpackedSize":213849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6hPrCRA9TVsSAnZWagAA0/kQAI2455UDdrkpOZhHj/e8\nEeNcL0IteIeJVAZJq6LOjtReDPqRNoXvOw7i6V058mkABaqYPns61ZLMgmiC\nlfH6YwPlV9fSvAYHQN+iVHIoeuyKw3PCEdWzLY0pw6ifSEHGaeZddAgXT00l\n/7ZCFK2svwVxkBAKpGyaqh/vlAZOcT95I6EH827oaSr+NfP6tku54swFu0wy\nrgZjuOj3ONmkqOG1JxQtaeqpFU2sXNd4mJekAj0BFQqCF1Ud0x9ExILarvwj\ncg4quJrEEi+VuAIU5pilpTQ3WUT4EExyCBwnUV7n+zVCyjk3ayK/YsaMR8fJ\nYlZayGX9ZKtwq4IkUmBb000uIes+nT72gvpxUtbgDwG5+8VqDaUchYm7ZcXd\nAahCDRm7JTpi1/iZfCIGwAwDyfcW30olqrYIqoVRVv9zw3c/ZYK+PSAQUNEP\ndzrtco/0+fTaMV1pKOQE33FybUf681Qex1cBkEAtVWtbKKzdgWRSv2kDxWpS\ndeNDz1AIoajbryPBJ/HanyNZnEuhv9PzIIlAUFkHK0szguruBxx3dkLuJ4Ut\no5N2uirIzHABRDUePDW1+2K7Jr0SKE3m4CiPFETuYWwpW+2qWKEFWAx7ftuX\nKNdX1ZKCjQjyEeWpLppxtUvP4vSnO02XwDkGzA8QqaN/A/CFCzTNdlLpyNdN\n3E9f\r\n=KmlH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFZQm1cOTlthu5WZ1YcOhtCYJQNxm14HpKeOzEJweUmSAiAdiJfMxjoNK5XLO351bpV7XHNZCCUT6CKEWyFtgww6vg=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-bf8c1b39.0_1609176043164_0.3964134929778418"},"_hasShrinkwrap":false},"0.0.1-beta.0":{"name":"@animus-bi/redxs","version":"0.0.1-beta.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:beta","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> An extremely light redux implementation for any occasion","readmeFilename":"README.md","gitHead":"44b6d8236582d8135d51bf1be05c628e0f5a31ff","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.0","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-3M4A7wYQMhwrqKHidK/cYCy1ckKnbLX4yCbHDMHtM+F+pf/HeNEClPYVDjmIeL1cX2+AqpGgBHxgCMGT9apvog==","shasum":"ed926474b2a0285b1b484ae726dc567008b7557f","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.0.tgz","fileCount":40,"unpackedSize":214029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6hUyCRA9TVsSAnZWagAATmIP/jsY55rT1JHwOaOjzbGz\nfT27MPdfsynq3IDpVU3CI0f48P3WWpANz15OHWTREDDSaqhhVA7mwVOO867w\nq59wm8nchqAIEvBESJl1VUueL1wRMTZaTpg3WXgOGqWy/cGhUsYPSh8cChW1\niw2KrvA2zE2SQRXkT9VRSVv841XBwYTfZus6KiXxW0bxl91d03Cq+JO4LpNh\nJMQqs+suw9mOHLcKd7ApqMwjT66uQJIHVzrkT0ioHbH2vn1ucRWIYD3+JQNj\n5CFfdD+lAcVOxV/DtXHRXcInKtK4/d0Zo7IF9cxEDEwHzcR3ltu74NO6SEYX\nYd+sq9/BYKbrhig7256qTMJyIY0XOLb/QXxCHkbXdv7YHUAxxR7HJetYCMTV\nyVOcQ1l8g89+DpvI2iiQLNXAEFOuop6oyUY0yBJsonhqWfvRCaAX5oheZDkx\nyaXQ8zoYk3m4mqwl0QGMR0hc3/ylOFN/OLh/zcVXLlpEXzDqLbKwfWmmbKPQ\n2Q+B6EoMhhgsK8PN/xDT6lXFtR93kZ7aXLVy+41x7AAVnQ4McWKWE0x4Aev1\nY8MFSTaL4WOPyrrC7mMR2YU7jw/+q11NbvUvINTFcHAzZT6E76PBEysOK83A\nkBkw7+xE3U9ERyIWH4F2rNdHiqbMxSi4drvHgFu7O6wAoep2U2fM9jXlw15g\nFj+Y\r\n=QYT8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDa+wfjCoWyIxSmPmDIIwfoT5pYIisHeBiOsgzJ/PFl7QIhAK1xZg4sF4h8u7drZOqFzUqmB6IIude2glUXfP2o9HjG"}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.0_1609176370398_0.9005457164563664"},"_hasShrinkwrap":false},"0.0.1-bf8c1b39.1":{"name":"@animus-bi/redxs","version":"0.0.1-bf8c1b39.1","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> An extremely light redux implementation for any occasion","readmeFilename":"README.md","gitHead":"f032e106c6abd48125799321a1f522b89e30e520","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-bf8c1b39.1","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-54h7HWvs3BJTYITFlbzl3bxmY6cuAhs6RqYJ+FQStCocjdRu/t+q3WShRebwtTcoG4VakRZFRZaE080Sz6QYZw==","shasum":"16804bfab52ebbfc3a9f8fe74275c37dbbdff093","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-bf8c1b39.1.tgz","fileCount":40,"unpackedSize":214035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6hWNCRA9TVsSAnZWagAAgrMP/02CpejrMxMDuxSfDLbX\njianpjHYDb5BWEKTqRXLfmirkcZEjmYzLDzBIll63PruMMwVUuHrniN38w5l\nvUYDUfW7BoScw8k/qE5LtGoFsU/mgyES8wf4AR9OWX21pZfegTpmEsTIbAWZ\n7mIwWUOPtqjChP9PNibDRzKO/9MiRJWKJuDM1edxVF/Se5y6BKlilRIKOCTE\n5yUhpGxJg9BpsdOCB7SnU85xWbWxsua9SLojJPn/bm89vTrspgOqudpT0bPG\nHWY+LyFOb1NjKqeb4Ob8RUALq8frUo862/scJmYmMQfGWutK7AEcKIRw8F+V\nwmiMk6dMmLC/k4i4s0elBC/w02y/9NFZnD4IaMZ9PWd1rDjv401IhBd1Vx8G\nBIFgdCtcC1FGqcjr7ACEfZCtX5nwj65XxNr+3hfESYmxjcZbfAJir7ZOH6yl\nA0t9Jqf1LGu2AGh3tMcR834Hk/cA4UDQPOtanEKmYBSfPIiCgSJ3smWmRzMo\nRz5HcuAepM9xZAkybT2Ckbs5sMvCSZMpuP19ProsM/x6jRx4aFrxIqhIMWis\nxQVB9mMODkEkj9qCc4MPn6g2+9T+XEJXzOJ+NLUV3S1uuXK7wmJ+aItiu2zL\npL5aRLjoiyZRpvP2XgVzxwFGo4hMoCqW+JJSNHl9q3GN6Ks40loM8OmThfGm\nuQdB\r\n=Y9cg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNi0TGeZNBTDUOdomZHdfb4Z63rvb6TQ2iMYiWZRARgwIhAKnczbnGvOfEqzirEFjMjVepPsy0W0ivku10mYEKkIwZ"}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-bf8c1b39.1_1609176460672_0.4054251246345897"},"_hasShrinkwrap":false},"0.0.1-beta.3":{"name":"@animus-bi/redxs","version":"0.0.1-beta.3","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and optional `payload`\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    ```\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public payload: { task: string }) { }\n    }\n    ```\n3. Define a default state\n    ```\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched action that triggered it.\n        ```\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            get config() { /*...*/ }\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n\n        createTodo(\n            ctx: StateContext<TodoState>,\n            action: TodosActions.CreateTodo\n        ) {\n            /*...*/\n        }\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todos$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { /*...*/ }\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        createTodo(\n            ctx: StateContext<TodoState>,\n            action: TodosActions.CreateTodo\n        ) {\n            /*...*/\n        }\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n\n","readmeFilename":"README.md","gitHead":"a4d19b6a086c312b549a5b033e64fa2522b61757","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.3","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-5RQNrIKqL74xXltI0KG8fI5+hZKPbDaRbKo3snB5+caQnK/c3OF5XNF+laLo3rzwmWVhe0SCfDXmuiplWVlQwQ==","shasum":"5d7f1c36c7f149ec48ba04169c015079b88320b7","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.3.tgz","fileCount":40,"unpackedSize":220997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6i8QCRA9TVsSAnZWagAA63gP/3gimorN1np18QYebU1v\n2Ac0LwAtMcEO7LvSVAmJjNRE6zxUMTs6h2kTtl7OY/WNxGD9ohc0cvmSCuU4\nQNCY3pEBXX6T74mplCrispZF9LF0OLd72sIuakMOoX2ZedLi3THJPMMvp+iW\nbc9jHqHMrr3hBtlpF8pJB9VppnL+34lufNPUrcEcpXjYJBJfwi08dn4Cf1qS\n6pOXhMGnoLK+FvcC0P8BQ2j+4ERCzrk/bHkiPk+MtdBkZ2+XTLPTOiQhlXsp\nocL65lDq0MLhwTV/AyPSm2NdwR68z2rKU1dPnUsotiiFHLtDYcyMFJW1PgO5\nXUgZUD8OVVntlcH3m83buci9rOPrPxCMqAw11EEm5ChG+F8lBW6RLxEgFmly\nYLoG2b71SQI9f7cUj5sTbyn8bT3jvhGgu94xQ+6bTRIZIWkG/5NWQuLSKZ7v\nd9I9MUlKZL5SMGlOK5A2bApce9vWZlSq2OHnxr1y7iKD1n5xHY411SY5bR0H\nuLIeBJJu//HM9VW3eFkgOJJs+TiaBaYiEKCvBbeTWQcAWarax+m+Zyed5TDs\npc0cGuR+BaC+DMSBJCR6+zXfFHTfUdyU1nhcmZrW5ryw7/EKHPPIXlfglaiv\n8E1w5oDPeeWIgDaMEUhT42F11T3/RZtN0zyFwIUvggOFYxI5R+8qz4VuFpkE\nOciV\r\n=+mZ4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQ/WFPRNjJnHb40CGoUDIudYr1vc7DGu0SWsahZm3NBAIhAN4LEFpHxPEr+BkZ4KrZrhltwo9c0W5p41uJIWWOvFfh"}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.3_1609182992039_0.2482797363630065"},"_hasShrinkwrap":false},"0.0.1-beta.4":{"name":"@animus-bi/redxs","version":"0.0.1-beta.4","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"8a3a4ad518ba9fd1ac7311a01615f82595cbe205","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.4","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-UroYlCEocfd4bcTHd05vb7pC5ojLXOzQs5g2xGqeZNcK6Kvka7O5D8iKuAmE4YKByhpnsSGWa91g+niaaqqQ9w==","shasum":"613000e7da8d0687133f0749d6f9a623b8a7d5b3","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.4.tgz","fileCount":40,"unpackedSize":220997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6i9JCRA9TVsSAnZWagAAYGcP/0Msfb2FBLa5Kd68uM0N\nUntGU4KLfg9B2lcb2qdNyDLAs1wOr+fmRcbcovH/irQGlZp1xoa7BZs2VtVd\n1cvSo8zMhRFCjp8P50OlxfsE1N5h1kdi1hHAU1+AH2MXwG+e4DWhCNfxBZm+\nJKrYeSy8VUnrgWiXcIyVuXGa0wxlOZRfBOPvJH70rLeyKGFdppXM+KutJeFY\nryvOmoBLFHw+tSQ0vxCzs7x+O0Y+cki5o7TACqawD44VzWxuxoR7ST2z9gsl\ngRfEQd79rEhfsklcOK2uOYCBqr6QODbxW3UNUcrGh+vJqcIAZIleuMDocCdz\nRfCcoXxGjaJ1Ua9ZFPViQIFs7RvmaPD69w52Z84ZlIjHfbSaDsxesPik+Xif\nxHtR8h5bvWm0NfMgyRxBVDXbBxNQx7b2JW0BKqrVkT76s5gmju2ITAx9z1K/\noKrbPp4hyYuOhSguV5XvSLoKiS9AYgAg13Il8D98MJXnPiMCDUE3skd+2+OJ\nNzo0S+4h+0yOaXiaaJNO+WLwPMfRkyOc8FAT4cA3rsV3ubBc3LqVS6qEDwYF\naNzvef2GjQVrsw+vi9S+xPlOTZj6hFyk+AwPGrB4AM1InDDjeMRdNZizODoI\n2zS1diib8SkQTsg1db/EQ/96MwxqePIXj1W6KD0GdiuhktJKbexBuQSSOYLR\nyyMg\r\n=Nprh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHYse/oVgvcoP4Oc8wcbmoBMiD63ELMhzeiY7rnt8UXjAiA6SH47pnKn7AQtnn1vhO/HW2WkYvJLEHjCRgcTfq3wgw=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.4_1609183049306_0.10691692535078712"},"_hasShrinkwrap":false},"0.0.1-beta.5":{"name":"@animus-bi/redxs","version":"0.0.1-beta.5","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"4ad997a398db9439b3eaba2de297241e02f87268","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.5","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-uETPHUdG//i5MSEAqx7J0icW4jwyZBe0e/BBY3smUvyfZ1zONO3kruS0Vm90VnCLyp8nlfw++b+ouSiVOk7U0g==","shasum":"708468147ee39e2118eebb92da2319222e3701ee","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.5.tgz","fileCount":40,"unpackedSize":221574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6jmoCRA9TVsSAnZWagAA9sUQAKGTha9bqMjRATH9NjuJ\nHBb9fdA22EeNHB7c2/UtY3ekkTKkhzqV/k4EnIUAl2AEPKNB7WzOdFtHIlPj\nZ5Uw8V/DzjyzMLIVnOi9hBzjh7guBC5dpvLh1/MUUhoGLWG55rjeDdkwlyPN\ne7xjTYOuhnhTAUOMH1KoWq6swaMsfm1pXqdX6dwiKWfY2cD2bRr8R+5o/7Iz\na4gce+9V9DzgtiDlk4Me7a1YK5J2VQAFLV84ib5zWjEnxR1P204u3GUEjpE2\nghPf+5NU+l2QGXy6aCsjizDdITDXd2kTHoNGCkkjpTFwIdkn3GoVwEqPVE0U\nzDsdPrANfbIBcS/5XsmVb3TxgffZtEn56ny9SE5ELG1T8LsHBLgs+Gl1BU/Z\nTeQsHTjYfkx8VP9Ah5qynG5W+AwEAcHgZGn+zICuNr5LvJ9zkkNLia4bseRM\nNGp0cj8lXR3kLMupzrLrhwnOyJXGjWpDwPMSOzv9WLBY8rtp2cATchiOVWQC\nce/3XRwlZquIb5Yd11VAiRY9V2saI6/EZFQHVp4Mg7/oKnP+XhMIVO5pUtBv\nzHZue6TFeIsD3TZ7X3x/A4/Qi8sYgD4iHgu3+cPEMgnpnC4vgzhj4tIpw+dc\nD2MXX3XTN+a8xmCCXJs8h9Y1iEPV6yOFwaD3Zw+B5pbRHueqYYAygNKgKgBX\nscRY\r\n=SZsp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFqMas5DBUpchrz8oHmBSixqOEWRwHOI7rUK2dQkF86YAiEAwiYfob1n4VSScSahff7m3ZpQssUlwtixGAEOhfq5NEc="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.5_1609185704465_0.8841631889959112"},"_hasShrinkwrap":false},"0.0.1-beta.6":{"name":"@animus-bi/redxs","version":"0.0.1-beta.6","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"74d7c757012e8b288b0acf74713126af4953b60f","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.6","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-gFht+YNKnKm4JRkS8tXHBFMV4XnADob/xn8hk2UkWU5HARWZoIExBmEfklXwV077KjmdM/ctFHpTPnQf/G2zaQ==","shasum":"3a733c9118446a9f15c336986eb25660f78336f8","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.6.tgz","fileCount":40,"unpackedSize":221751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6jvsCRA9TVsSAnZWagAAlJgP/2KXco6GWr4Zzio/DMF1\nX1bV+NOrtAlU/mrJG2IgLwXcFDr7tj1cbgMDKUhCj79AIXTZezEiBpp9slmn\nKwTeKybmRll5a+gLBBpet2sT3yAfbnzJuBOO3JUM1Iw7fxhZleYKt02ZULgy\nWB7112pmdzrzopJKafCqad+3He7BDQHMfKV9+PhvHGWutOGMTDikkpQ41FYR\nHomCIdM5M8RFa/DrzFkVfv+Y5Q8i/TH9EBN06Kotpd5mRkacSFQv9bWjlkRz\ncTBpfdHiQQKNliNoyN3rOoziLRbngxnz8Paik7/KfI9bA3QH3WidA0tYQSYq\ndB0SytDqdN2i7E9pgSRlxw9nMtUZs6MLfYtSry/ojADHdV1smU0HNokM3eKU\nuezYK+hhytlDoUKHEuZcgJ0jRDeSXdezHDfFIoDgupX9nC/AFlJjESJk8bs8\nucdxrww5ddXLSmUxhe/rx1Yh8zfRplu1pSwmAEZhvJ9TWsbpd7yIEey+T+or\nbYYhWvPx7rLhBZARgjydykNXFWgOlWAXrtt5mWX3di8VuzTMHoeb9HhsjY+6\nLHYqVBMg2+4tuHzrGT7WIb9TsLGSpAZCE836kV+XACr8HafxQdZDOeq2Fmw4\n1H27pTMyPxiSI3IlEveKrFNu1vxAN5QG+CZmymz1Vnzf3B0PdNUIRGF+8OiR\ng6v9\r\n=BaOg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDRATzfDWMgBxdKmaAI6VwzbnZO3b3IQfb37BwFwLSiYAiEA925EjA8rMArNEjuezLmjGvcjc7r+gt3bMdSk++lECvs="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.6_1609186284332_0.80863547761605"},"_hasShrinkwrap":false},"0.0.1-beta.7":{"name":"@animus-bi/redxs","version":"0.0.1-beta.7","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"04e659632c67077944048731b6930176908ee741","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.7","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-QKd9HZJkH4eOMdGwCD1ewiIBudL1TNjOV7H9PeJSHlpXbNd5kIUGvP4qx/Cu455kklhY+Ww7X4WszJ4TncGZFg==","shasum":"5eacba438e78a16d51f66865819276b6e8792329","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.7.tgz","fileCount":40,"unpackedSize":221565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6j9zCRA9TVsSAnZWagAA+VAP/Rmp7m26dni7aQ1Hkt/8\nvA0UheMqkwBbBsl0nMM0U7ejWEBlCWMCIkrJco1BcLOU4K3q0w2+Y7RJY0B6\nJb5Q2MCjTXlhHhQ7+N5PKzwf85RDnH9JIXeFnnyvEnBFyOX+Z08r1N8lbQey\ndMvrjg4aBYF1MWy8DVk5uW1NwyHGO0DAAuMWWWgF4o8+ByoER+s5rn15q524\npXhRdZSbHwu9b/OPyVsF75oT/TqRFjK4XMpkSPxxEieAPah1RuH7E96t7/3U\nUOniW1sC2RlO++QaqmByP2yEFYyp+3+UomTjhXDYNc4VybmXsDBNR80EmIAn\nAvNVOzmAAvR4QxI9B6s9KI1NzxSsRWD1UdVjTQNEvZK9ccndn6apfqUNgNV5\n5b1dtrEzfpL4GsYE+KEwdpCmUnjghBu6pPmSokNZcJjg5iMsgHNKCfpkr4r2\nD2ebtdhlSsuRXEKN1tScNRt2FUippkSwzmsdMfhlhFBjrQ2KQVoqUTJGZ9Tm\nJCg+ROXlqG+v1bL9TxdtR5hbd86FOQw11OmQCpDUKn5EaOoMPApNuM4qZqNH\n65joVAzq8RMSn+fITr6OzoDZTryPW+EYHUWNwPgir3mwipGoS3R+CspwzM9V\ng4r3wL4pMLAqZcuDL8hguaofWloyA4kV08REY4tId2gMDBXI0BiYueqdgjAX\nyEcp\r\n=UHRN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5+gq5TkuPbz4hJg7p423AYaQ3YhOgoNyJUuspgTOqIgIgBIQLs8HwD+0w9kXEXBdJGQuX8ICG30sCcSGWYh6Ilwg="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.7_1609187187334_0.5829460445083605"},"_hasShrinkwrap":false},"0.0.1-beta.8":{"name":"@animus-bi/redxs","version":"0.0.1-beta.8","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"e6723e74fe01adacfcbc9cb8b10d67a9a1748a56","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.8","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-Wo1DesrNpIfp1NWc5mPv6l0mgixQIUuc64ygs+98HXoEdnUBHPFb4OVkwKPmWD3jeqZfXCLJJ9lsohhyCFSvMA==","shasum":"6295971235ae78746725672cad2b1799af70f2df","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.8.tgz","fileCount":40,"unpackedSize":221849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6kHfCRA9TVsSAnZWagAAJcwQAJEAt/DtZa7copy2erj6\nw8VONWXAZJDMPWGSLjLHI2moJoj1ZHi39dCuAT0qVgpYZ9fBsplkkmBpIKlx\nPSuCVD8We0I01iJuGQeLpUUc2N3cpDw475zjrwMZWdOSRCKRoqfb8Cz+3qSh\nYOshmBna7FaB5ReORCp+HB7vuo78FinxlWlnLaTcCmgnp+DTWxpXnffL5uFs\nVX/ym8FnAnlUYiD+RswJm0CIKzZosZiV1wa6XRANJRwiXLKYgrDKL0xpNbyi\naPezvksAMoHSyOeqDcHxydkyaAChAJ6pfHkLyMQQYnQqisFrozDLI01Dkw6j\np052um7uMR/ntKjbN9GDN70Y/JxuDQ0PWSuLmLtU2XuEsQ58Rv8BRu9hzkhY\nYv9mlTz3ViVFHB42+fTtJHKBoKJ7MB+GJCy6kNIopMgnw628c925NRu7XPMA\nkzwRXciKRBEHhNNez6ljZUyx83LcvDVAttB1Jve+YKNT6KjRRuPx3eW+EGhr\nO7xtRMTHSlIfUQDYTqVGKeH09xVy81lrI60QeTJzTeRFAlPr7aDz8lYxlmUD\nXOw+sp0tkcWDBu1/uZt9FqReXpfMrygpZ6b+F+IOYE3y1werr4ZDtafx3UUJ\nzZeqtGlxq/WpzwZ/OPvKhRhYZj5c8Y38Pp+AeaLWFlsOBnf/tZ4mzLOTwv8T\nvH/D\r\n=tkf2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD41+x+FKKi2SR1c14zHAO28loSZi4GxnsOHqT3NWo6iAIgUvOKCSo+AqL5zxEZXiRaAlsar3VrYx5fUjEqDoRkQZ4="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.8_1609187806529_0.248110401771791"},"_hasShrinkwrap":false},"0.0.1-1491714b.0":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add package.json && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"a89449eec38e84cc1aa841377a8c543f79d16754","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.0","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-H0SlqimkOE2EBXctF8JBNRy3fXZ1EbJSPZbMIMJK05qdPvlst/XcNuB8cClGFZ7VD3zLwVAsGucmRwG5BZB1iw==","shasum":"3767dc5ce09c034e8a9b5b5f1272268395493ff6","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.0.tgz","fileCount":40,"unpackedSize":224195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf60qhCRA9TVsSAnZWagAAHFsP/jFaaitm7WDBPt6JJwfx\nkX+DLVT/xR70wQ8IEzGUF1yrICuyQcobm6S1bML3pIHH3kMYah1YxtNCFZc3\nBny38W0jy3YqCsDZtcZlELDO51GaNAbIU6NBBFua0yKPTDAmZVjE84tedYga\nHhwddKs6BcMOEBHAAmAfA4Q/Nz91hPOC/w70WM/XYzaPmSkvkVSJwpMqL6xM\nBY3zgGblQMhjZVumegPJ7hF3yph9H1Pw7FwXVmhNKVChy0hVLDrDzGs0hseY\n0AOEwqix1kzbe9WKxQ1Oz+eUCHIs2J1CbmD0q4Q2AtCjVvd+PBn2ffztoQPb\nDz+8nfOCqrSoyLQ/Rft5oA20BjdeTOFU43OQq3LzyAyMpoYMDQK15ma/CJuJ\nfSju7mTrIAWG/BGQwqqwOrbxaF36jZOuTXJjpQlP+v8zCY+DFwDQidvY6NVE\nqK0U5WI5IR5fTMKevseupM71N4WsessGqHAwg7VvRLLCaw79EorI0FEZpP9t\n08u1W/ilc4uC2DUsELJAYvzqanHTDV4iQNJcq1jztIJivxKROFYizP2TBroT\nHSKVGGCqPbHKc3wRqMdkDGC5CbXxDkliF3xaRQWRsD/oRhaoDr2Qu39+8C6L\nRndT92aSyvsFecd5yovcMnGfCwyQBlgdm3Pu1gI4o9dY6Tnv9Y4iKf4+oxcF\np0JE\r\n=A1rW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIPShVrKg7ljEKsfGRHlHT11uXyNeHZjKy9q7lZgPv9QIgcU0MoomO7vykNw/vOqKyR9Wjo5mxFq3Zv4ypJ2+4jNU="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.0_1609255585055_0.9398635436327425"},"_hasShrinkwrap":false},"0.0.1-1491714b.1":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.1","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"12f473ff75cf6558de7a2aaa7f0f0d8b94549c6d","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.1","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-JtARln38lehNpqkcLHJGJ5dq2JPZ7HxR4On78TdY7JqiX+4hlsQso7P7hWe5ujGvd7FDKcq8KJ5LGDq2bVMx6Q==","shasum":"98bb86d8a350c390db1e423a53d030214de037ba","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.1.tgz","fileCount":40,"unpackedSize":224436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf62TECRA9TVsSAnZWagAAeyMP/jDluPGMzWnK0Q2VucqU\nBZuvQXPxHnXvqk8gH9YxVxwV52JvVXV5AoQhB54zmfcktXtENrKILGil3jxP\nlA05vNejPOejQO1Vz3pMXnBEPOWA1dB+708ku29YXUO69iYshRRrI5vRGp+j\nxMgxlYjm+clsF/LDo1QmJ5FvwilCi1uXzuFXOB/JQArqwszPaOaLIVDHmIUA\nusmLvTj3vWELKMjDEYj936sxhb3ti0KEF6Xl79k49ShExuxiHUTFzBNBGKAb\n/9jI2lJo+boIWPsnazV7QAB9jSeQmRmmlARnRkstfHuqSXiNEHl9SDPvzqt6\nsnDJ3yKfOreWyVp5u+m7do+RtXzjNSUixiUzqy0fCT5DZgO0NpQ7YDJ7W8pg\nzQNIN7C1OeMuAZwpQ79f3PLKI645fKofaruatRoRI4YrdITKIig4DZVBiUlE\n4qZ8QBi8KP3hZVUSz3KX7QEYjINEqOk1hL5aESOvfIQ5ic99WCa63k3G8c8k\nOl1o+/cQCMvxPIvz2UauMEkBBg925cSX+mCYsKiZsX7Yddr29Qa4zSGsINCC\nFI1hIcz6goaJc1G2g3PWXrXxSCyUuWo8DZ9FU6K2epUrQad3YVYc2rHD45w3\nykS7nTqcvJp+nZ5uzHA5i/ApordlHshW1ixTY9pI14ZAQpNOVcMO8U3mHpbn\nUrPl\r\n=r4q9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICJpXUrnS3lYwsujxyFqcicDY9AbPRP7DLBoNPENlgrjAiEAnJfMcQy72JYhrvibc5ClU1Gs7fvE4MeJtakS0mgoYEo="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.1_1609262275708_0.8189811148574035"},"_hasShrinkwrap":false},"0.0.1-1491714b.2":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.2","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"182d524cb671cb0abca34adaa11a8f49a6d0b0e1","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.2","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-ZA+SHAY8HRiOq1tecwU4KsqGdM9oFiR8drdNmJm6Kdg3wfcUCRQAwDH8iQWsXxF/J0ZsRN1YID+SDeO2nD/FWA==","shasum":"3f3a5738e42195c1da4383b22067c74b2fbc1d97","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.2.tgz","fileCount":40,"unpackedSize":224223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf62roCRA9TVsSAnZWagAAcqAP/R+q9orxlzw0qwrOSDiB\ncnJqk+WPKfv8SNDCEZL1aXOcfZ/KxqugA+asWV3mikc/yupyDqFwR5RwgGuZ\nU9zA39YT4LbLtT8eWRYb8Il+QQHwXq57Uv6QdCl3qZifCG3Op+jVluKg/EKl\n2hj+blxxRxZFePjV2bNpH2Wk4jl0R4G/hX8Yt/1nctuuAsYXy3cPKegtHbrV\nHNPH8z1KCgGDC/NQGdI4cPas8yA4s7LEum8PNq7ok3PyEnNMtcz1uRRFqtl5\nV+1WhkD+o+9VH9GmmRBUFdcC6fkA1p0U0SPslicNJAXWelNvtupNS4WzwuTF\n3RH/vjhvGeDrlXTRSdnG5xsyzwJxZ6AZFHWZVhKbEv3hmJwox4YaZAkvLbLx\nF4vS/34UoDhk5+RCLo+Qz/Pp6GHIxhyVeygLcrWmwza+d+1gu4lOf4x+GeDh\nJxR9KAM53Fk7k2UYgu2Er6dlxoKmDCiq1q5YPNdg9drxeX6lSkybFmQP4DYk\ny6u8yg+x47kedrU4qOHVn63U9bFRDMgun+nsBtP4e9cW960/vFQtjwTahHnH\nCXvMYEq5PSaKIvLHbfzFl80MVq3bAf3CpdpRxoCcJcwlgDhQ2reV6AIXmQSt\nKu4S2cLsg9PPwgZRP0F/oiQQUZ7ObKHU42WDAXiaPQ7PnqEykz8QDXOuFFaW\nM7UB\r\n=HzII\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1FG2ZSJ9Y7UniMv2rp+bvACdaGWYR6v27/WLttvE8igIhAIx1+GGrMie1Py3wB1915x8eqT5qXurd4OA0jbfUqVFr"}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.2_1609263847668_0.8739400934793589"},"_hasShrinkwrap":false},"0.0.1-1491714b.3":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.3","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"d460474ee21b3e867d2d916ff7876faf0a6bc6c6","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.3","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-Yz0/3W0j7q7X7ZCR5L2GZAL/PzE+bwmkeVpj8RVQgQNIrnhiXZt5UnBBV9kr0YKyvRGgySK+4q9aXn3TQt/c2Q==","shasum":"a213084bad953fc2531484b3d62063941c685570","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.3.tgz","fileCount":40,"unpackedSize":224260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf63r5CRA9TVsSAnZWagAAjBIP/1gVA79wccnPozvAvEN5\nIMNadF+G4wCZCXI04Z4KOHm55XucnvC1H77mx5WUTn40L8PCsIkgZP4lv/tP\nJ9bJdh1hbV5wV0+gD1P8gO2b7wGJUbGGWgGC9PbgUC6sG41GC2eh1XQJa0Gu\nwjWw9gqlzJB4CVq3hES0b6cf5WL2Yic5wZLIY5GI1FlKXITsLECtsAzSXMxy\nlBCNfxOPo9UgMwJq7WJpcDOa9xUw+ftIckLnWHAotrdRwxgPF58rwfb72W+j\ncUodBV/vlxf9BIR5CO1zSgEqgza2frRJAKxutq/9Ne6TXaVd0ZRnbOEqHUTG\nxJX/j10qnHjJ9Ive/+QSrpQoz2z1kb51+8i/Y3qVOrzzGtO9vn+0g92L9z39\nH8s5GZ9JUFwIPNIFaCY/Ik8npXULLa+NjASRR/mo1CcQvtLYr4hswXCUnCZ+\nEelgVpXHu8+8DB5eqMjnqUWmcMj6m08mZPcp01qsVX8c/Yw//pqwGdVEnZG0\nBPpRQ0qoDvNFtKAe7Ksh72Qu/1V+4JAHOygkrd32JWnL3+7Q1HXhWaB512xq\nWoPMyXkJDuZ+3s0OEjx8Ir1adue1Nju6TfCxDyCxZZHGP/xKdZ0Gbpq6OKUc\nQOHqEjoQ3GjvQr3/LbztSn1vz94K9CSrYsA0VtmV1VOoYx41Gk3Xs9WM+Clb\nvwvm\r\n=X/nF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoy8SWmPIqnWOI7v8YjKe94S0QpAwjhb2j2NM64PxFIQIgOfuKP9SjBaTgqvWm13T6cwvL040zR94rlBjks5594d8="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.3_1609267960521_0.4294632005660002"},"_hasShrinkwrap":false},"0.0.1-1491714b.4":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.4","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"9ef042e41f33c277cbfa96839e05a47836abc378","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.4","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-D13YwPYWjBN2rTvzduUa23QP9dTuScvFrpArzfbB6AwN3DrnDtXDAaE/pl8ivTpwfo8eguOXwhqZg0R5NAxJ4Q==","shasum":"f50f1207889d230b2ad514f9389bcdb70a6a58c6","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.4.tgz","fileCount":40,"unpackedSize":224264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf63vuCRA9TVsSAnZWagAAys4P/jQFm7P2vT3dqugR9Gj6\nCZBg1jr13b4CvWMbHn/BejpRE6o5c3mKfI6frYJ0yKNtGPgS06KRlEzgBn96\nq4ekE+J/V19Tpl2Cgq0pTnTyi/EXYFHAL/heDKfSOiryKO+RrWL6VF1YutB5\navrwyMptdg4jcTCpyKXC8niP2qdxKKlR88Ty1n3NA3KY32qJHxcjKE3JCRIo\nq3pU/qbWqp5AnzqwwAmIJ3OAbW1QuHPdDG+fleqvBZoqfVOP3riLgAFKE9Lk\nRWqOqggvB7rpERWEe4Dov8hTFIMfsgJFM/qS2xXAxxKJEMIrUICF6tXK6omQ\nDzKtSuY6YqJz8CFp9CCzlDeik05vaM/CfVHxr2ydBerdtPB9mVqBYhwvPlxH\nP3Z6hrNJGJfrnDNQBFDuOxVcWLun458ZPn1dZjidJDY3yBmDIaAF5Yd58Xat\nrSrXMTiVxI+iMXpDYXPiHDgrZDh9vYppCbL5T/C2yrtTXUF2FBXfxp+LVgx8\n0cMEacFIl0OETDHt3sxtxpa7jM/HaPGuHXLDoqiejXWfJaV1pgxDgBqCNIFW\nFdFjtxjgqdizizGNQhx5skCl7moT4I1QVQ/BWARMEiNHjJezJLbI8pce+ZCG\nGpm/9L7oq2CeM8CoV7Gb2aFTAFGvPAfdZCmvMvZI++F0hmUtTn0bYdy97F4k\nCYnK\r\n=MsbG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDl7XYCsZKkIUW3idEoZEipKxX/N/spzKmm5Hj9MQ2AmwIgfWUarZhyfwABvu9DbEjRs8aCs2NxSCzYesezXgHoWLo="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.4_1609268205994_0.5817105731823555"},"_hasShrinkwrap":false},"0.0.1-1491714b.5":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.5","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"76f64538ea4fd09baff88e3beddda4eb2fd06dbf","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.5","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-V/uRlFSlggPT3nAQypZcH6u4TpDyaKx0FmD5dY89fqy+NEWQ4MRr4ZAhT6z87FouFDZ2YOCNiuAtGdYXuyru0Q==","shasum":"3d1ee748832501550a1b469462631388afe0a3c4","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.5.tgz","fileCount":40,"unpackedSize":224246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf633TCRA9TVsSAnZWagAAAlQQAItV6N0LqNcX9+7f/32D\nbKB5Y+xAPLcAKCrYfxsblSziVoWpusZSpSOu21T3H2Mrk3qeqYUFcJ0JjZIl\nX8OJs+MAU3I3RDHziwPW1u21avwcL785IWpClkmrZTR5jkWyAnbCqao/1+Ep\nmxedkAuoYAsU32UOb/a0ZcK/cs0VVp8uWhfIVd9Bz7xn558uUBduQO2KcjOj\nGab3R0nMUIPtCBuUuSnR3vRdcjvQZ9iCUldvU7LevMldWK9d14OQ3AqORXbI\nY3pCznCcpwKHZohdzeGVAgtHq/A6B6vTD6hu0WygAIEBb1GOI5hpqzP0Wfi9\nv2p4E//msbEewGGmJOKFRlr6UQ2MnFIlqk9HO3fzkr7Ga+Og7ZSRTEq4+4L7\nMrv7d4Rh9S2uivcAOHCqkjym49XmpdyHLLFTauSRyQJcNv4L7gS/lo65YwqB\neTKZq795W5ASQDoqAoZYSQ6PjUmF9oMn82ryd/YFlc2MwkDyC5o9yLOL7lFh\nayT1qfie7t4hfOKPxOCR5GnnoY1S05Brt+R9Ef/sF6shJzoQohTjWTXL1WHR\ntgkDXbUENwmbXYXvdAiqP/v6jlQ7KzOSzes4IGteUJO1/qU5YEuq+WdBO8vy\nwKq6k8ZBr0+KlmoxE4wt+ism5umcYzVBv+lRcPTJfuPFmrXaVQhLYzSwEgEN\nTk+H\r\n=meaW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA6hyQ5rYwOsXcaRPb5NHQBEobFEQlw42aq6yyzQo1mYAiBO2IOwxDxNsijoSGlpAFUCDzFVZmO2e01ThPmmq4hHYQ=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.5_1609268691580_0.5825327749362754"},"_hasShrinkwrap":false},"0.0.1-1491714b.6":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.6","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"bf85b56eb51def5c105bf0e62922836a3ee9db3c","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.6","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-ti/jR03p+3yBs+7E0u+MV2cNvQ2vY+rq0e9dZ6gCjpbC5R7QgDqi/4NgK3g+ro9vEYDLbdYQYU2QYkidQYAUyw==","shasum":"13a5e14c820dac7b9ad8c8d8ba25955060ca6a03","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.6.tgz","fileCount":40,"unpackedSize":224292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf64jOCRA9TVsSAnZWagAAIYEP/AmoOtpGp+144xw7JhjV\nGkE7OhAk+HViywO/UbICf1PAwIgpocXgQONcgTsEiAMfjZ/CYDLvQamObuNR\nxqPEkiPdTHahNjRZLxb3G5QX3CaLDEhbMxRiGwgj3vE97ayJwdgdvA5Nd/SR\nObTffXZA0x4aPwdRewjqJ7XiXRlAV+kdQk+B4nUKkdFl42/mRaFGY17nsGqh\nE+accBDL29GFPEwmN2V6AngX5/6oaTH3k5JkrQcRM+MOhPgtmJP5HFGF8QCT\nbEabW44nJ6xFzb9tZKE7Q9qkocNCnYAmGOxQ3Nkmv2ppuoM/36ZOvpGjzUqJ\nZhBeVudlBbBLwPuyM3408aK1vYKuHiozhyCxcS60/v5F46ZMYThq6T2etflN\njh7lUsahe9Ah4M9pZXjglvZGlHOoLPk0SQG9QrFuISaqTtadOPJ3Bb8GDO38\nkk5zak2h4YRr8EMAqDgrqUh7q9BubCatjexMSwdpHN73FSkxcewXVuBuo4fr\n3E4s5/ka6rmgvx3I4U+vmY/nPHIF2sxsei1sWvy6nLo80+MqCc/F9pR78++L\nU6z31WU4lhrf8PFsV1qbW6KigFuUvQjCKQLKi8xPBv/4Ou9cDr4kf4hiD7Yj\ne0AMxN9V7jV88+q6PDPM7VtLmWPARxiK9uyDqC8Yd7Gu308sxV3wkez05Z5X\nNbnr\r\n=5iyu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGZ1pLoGUyE0pKlY/f6ixL6i2XnUHjIuIoCZPjymOc8gIgX/lUgSlXc0mAzo9YPowlGmOSqzX1Tf0XT3jqmyIT51M="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.6_1609271502224_0.8067881852865293"},"_hasShrinkwrap":false},"0.0.1-1491714b.7":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.7","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"bab0c4ffed32d1df940700a8d08652c39e7cb0c7","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.7","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-m7N1sZgbeu37SugY9xEOfBQpplBT4u5rhh2cNVxJlgW02dhAtiV1Gi1QapgK5QsCVlrhqQe6j4xjKSWYMH9/ww==","shasum":"c2f529d620d464548fc7bc31085d0ba5103cb0b5","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.7.tgz","fileCount":40,"unpackedSize":224483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf65WQCRA9TVsSAnZWagAAqKEP/RJ240I3pKKqVprnaLtU\ny7c85VA+ptDWWujrrqOVHZr6zzGYa7TcbDxL+p8PNotiMhPLPIl5r5qYmgbH\nrbx9sEH+JgC7d+Apjlq9tA1D8qG43tIdm5zZdCorMNgyQyBkF1f7Y43hcrw1\n51h3xxTcWhEaH6nJuEzIoX3HNZ2UCFFEuri7XP65PBaZOomtB1Jyglsv3Kcy\nAcckTdd/OmIFzIHy3ISk9JG3L46xdw3zzO1SJAUgC34Ify0dCygDMiCYoRgL\nwl81AN19Zv5rQiMltYPA8mJ0c5wdUe4aRvFUYN0dwtJX2dPhsg3hcT9uWgbO\nxjLi5DQRwMhH+nlwDXMiXIJCPMsITbRAFYiCZ/x++JjyOvXMe4CDMUtlB1Qx\nyl1nk/X/LQVDhZl4U/ArFYlnY55meC2wu8yvWvBKx93tOruLYNcovqWoHYE+\nclDqT0VX0ru2xYJLPv7hHA+Gf04gAxMcsiukr2EvOSFlniMX0EMdeZqFZbdH\njt8DgWXN6dPRyRg2Z4EG+dWodpyDQnWFK3cpheDY+rIfLM2itO8YPbM6gVYa\nRgFeWW9hTT+XpLyIZKnJJefTXnDVaKHTdEudYrwMINMzg2T9SIILqvUmscQm\n2w6IItB5vrXTEgCS+Drwl7V3WLVCkkT1p52j7Ke78lLHMFFJcRKIoudGdx8y\nmrY5\r\n=oeiu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBxVAm7zGk2goLiomZsKBje49E8lCr/ZChRyyQzmrODrAiEA38ruUTEIWSASouAe0mrnw6RyqKvd7cx3GNk3SuU8cIo="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.7_1609274767909_0.34923494519226184"},"_hasShrinkwrap":false},"0.0.1-1491714b.8":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.8","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"1d6f0d7275cbd74ec9a4df2c37534c52f0036137","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.8","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-NlW7p2LBGlH/Vt6uGlu/1f0N0giF77dasmxF4CmEfINUJCAqEAHdPO964K1FHY1FWufo1I/q2AECjsSTZ6mrWw==","shasum":"2f27adf2e9dcc27226987a78832147091f243e7e","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.8.tgz","fileCount":40,"unpackedSize":224298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf65bPCRA9TVsSAnZWagAAsP8P/0iKOvJLIt+CavO11v7Z\nK3B2FuklH98VCpdUY3lb0iIStLUdIC24oUxewUK+CZyvDkioYMb+Ju8z6T8M\nz6OqgpVw4kkWQRv5lKEehaxMfRCfYVolbV3osyFWBYlZgKO2pkXSZ2XzecFj\nqnJCdocxOwcOykWp74LQTC93ntG9Vn82z3aDwOJcLH53pJv5EPXQIuClZXAq\nvC1X+EZ9Ljkfog9xvXzstzAYvM7pSYXS5Tjtz7oq04YKdhP+zE1JdqpAGa8c\nvJtfnuygxLTaBVskMr/bin9cZU2HslZCS+CWqb3rvl7Q95XWQzGVIM4D6vFu\nGkX8ZXqXaH/JR6yFoTkd/lO4Yl050+ePPHZOLYKh2oFbUSVZ0FEP/UP7tpTi\nTweAV7OjcMggPUqcE0uqpZkL5eMIZWl4hITsek/eVttJK6R0v/lA4xsoYrwH\nsKrfH9T4dClJp3pwyorsjnWH37FBO42t14ALD5FfpiMBtF3SThqG9QuEKnPB\nZTKD5tYzyq35gAUXz5SjydFcAAf4bzE/8re11E/DHPpM5/pAAO/Nz3fgB4cS\nQDMtbt+8S0Y4dvDp8O6PprlU7RFif/BTS4KJA7xrSbraPBMTBh2wI1XNo+YH\nQ7yCko32MCTRq/37l+kQ25/HzYi4PXER9EHz+WMi8oBx4Q3t5JodUN2Fo+gy\nt0Zy\r\n=cNYZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlE6pMjvy5xjHc/ckYo7DVZvQG3AkJZLIdbZnX3LqaNQIgJEQK7nghmhAZAFg4i7AlkuL5klYs2UaIbnnxl15ZaSs="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.8_1609275087500_0.6926941722483129"},"_hasShrinkwrap":false},"0.0.1-1491714b.9":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.9","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"77ce54f84264191ae0c9d61749b79780a5571e5e","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.9","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-KnEyX42OxWgcpjGGuANn2xRtaTFt1PfbZLQBCShhLjmihK9/PW3/OT6qEYNGEB6v1OI2id0MwCxqmMoU2jJWdA==","shasum":"2e350875975d701ba834ea71cb73653141432181","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.9.tgz","fileCount":40,"unpackedSize":224298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf65cKCRA9TVsSAnZWagAAoEYP/2NOnQAKgNrAnkfaij9E\nIXJVq6gnLP4ghexD+cLYnp5KSDdJ8Ta7yoR/7Fd61suxsGZ2fMu7PPbeBVHe\n2HiGFsCl2H6blvGHSoclBQF3lwgwDCqAzC1yl+c8nZ5K9Z18IlwlDcElvj4l\nxKJfaNhlR5UPDdiH1ICrk147sWN2lrFNZDYuDj3pArWkKSoF+ITP4iGlt+4c\nYoVVYgC6FYWL12tmHso07cNKQ1zRJV650hY5LJ9M7veWVpNIeHP5rRJcQoM6\nqfIZugvEIMaLL8RwdL4s31JXbH85XYcQE+NDPfyjeA8ETyw+JqXe5lZ9Nd65\n6b2F6sdDbrQmme9QldEQD5ZpMkmd9QDibZ0frxGX35iyf2i308uil8Yh83g+\n/t/sf5AElEt2+bxccQJRlRKURvMfds95DYTLl21GtqxUHQ46EMJaM8r30Ckl\nRsCK/qZbCUm/WxsOGEcKMl4g9IYEWARgpAkjt7cMB7HSSFdalUOa2oZQiNhB\nBHN3NAGrRpHBOhJJPtGNNYsniWFipBcmb65Yuc7H4hGzUzt3RyiH9q2DOk+4\ndyES7QCjzJYJ3yK7zJ0gHq51YFScwqT2+MIgAPV7ozuOKz1IsYReVvGhbA6p\nSVmukZddAvFlQU7Z4uJwhe+D9cC83iGRxyga0oB12J9xIfXIg438GWnTAFJ+\ny9/R\r\n=amVw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1RWoCq3nGvksxwQNsCcHxkOG1E2xnd9ojUqLncnjNMwIgQrxpOgKtH2dw7L0GYNYnzPfNIGjCXPo+l395BiWzEXk="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.9_1609275145885_0.8587147157153345"},"_hasShrinkwrap":false},"0.0.1-1491714b.10":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.10","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"b1723f928a32332d608860cd37f64a6e561a5cea","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.10","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-lzAGVAnI7TbXiJi3vYuBfYueAYMONEC/vBi+6+KU1hcPqSEa4DlQIqt/R4zF1KTC8Qdgd0Nw8HtJ6osurN3lIg==","shasum":"6c2c1443bd73a759e41b3d483ebf8a6a3678ede9","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.10.tgz","fileCount":40,"unpackedSize":224315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf65fmCRA9TVsSAnZWagAANjAP/03UXwaDsyQ8mb2BzEh5\nzGp+ly1vbVwwJMK9VShE2JL5tZ8ntXRFCwsxDHTI9P5uweIpiwlRTAT0svrA\n70Q7bn2MJxrq5mz9hIAwMLx22eDEx0+vxlXXCB8EVo0XQB1Wt5bGrXGq80m0\nQid3XujqxXo6hd+cWfz6RXA4qObYQnSDUvoJYgF1T1qP4/IaS2OfPUbjcLTl\nGDn8dd32/JyyUpsSLRtBsKfmr8L1WdgLiXpmehzqxdbz7B4RNr3XRuKRLdZ0\nemQ5K8kdaRxbLhnL0OTqkoM01BV81GAyY3tHVdFJ/73H7ntuwcNmwb4dvwUQ\n7pc3wzgbg8syDJ7s/Tkb3BfLiGwnsb7HKxJV752V5TznfefADeFUKqebiya2\ncniFzweOXoB/LqSpfx5NgDYjJL2icuSHW/5U9mMedtt8cLkxc8Segp4hgihN\n7aXMyE6VcrT+v96BsMi2KW+BK/aOKZPKSMGUVnmuzMetPw0VJItHxh+ierBA\nlcBcQ+7U2hLsObkEAOqVZD1Sl9q4Z+comFoj31vQXOGXxQU9PlkAlQrfH7J+\nUAIruk3UyFOcBHg7s+hFrt662Agyh2HIchJRNvK1+tuo5J3voiowHEXFX75I\nYcgM64SEpcJPllwpZAg6SdLFLDPqPTabYfqqJDLNtrCxsTZaeHJpls2cDNCx\nsHmk\r\n=pO8/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID90LzGYwNXDBjpNnTp4cOPcBM7NqbvjGtALVe18Cd6qAiBJsge2vs5/YIKldz/x4hihRup6SiZGyeiq+p9VUBm+ng=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.10_1609275366012_0.956366956262642"},"_hasShrinkwrap":false},"0.0.1-1491714b.11":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.11","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"58765ce8bbc3a4bdde65fe58ed0907a3a60576c3","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.11","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-uW0YuhUJVe0LboxqPA50fRNSzdlMvmOaTnRm7dRPlJr6TlrAuuVAZt32QtNC1dEGuOvD7oL1liRkkZUcU0BkmQ==","shasum":"222c52a04b4c5f45787f7aeb296af017415ecd95","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.11.tgz","fileCount":40,"unpackedSize":224353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf65yECRA9TVsSAnZWagAAkUoP/2pLoaframUdYDYST7PL\nMfOiMEIneQhVQqIcwYNycCwk1X4yIz4lwMbWrx7RmRxlDtGF1lCSxU0yBFc0\nB6E0hMVYc5oNRpodm7lcIwq0ZtbcGEJNKE5m4inwReoaerJZ1gArdaJ3kJ5z\n9tpypbkTPk2d6Fn6Zor4eu6iM9TYIQGg+lJz4xZWWmxZFU3lsVvM5DcS+r/1\nFsr6TvTpANwfUcM2REgC+bcZbm5/WZfXEDU7RZvHh/vIIPrmpRxthG1k1uXy\ngzhXe+jPRFy/Qv3CgHcxriTDg344WZKB+oFzT5C2EHUi1e7JqbfuJoEM+0I6\n6fIbq4meoOou3PpcVdSE8qNjBmOkcWL8zans8XQ9hI1yr9Rf/F07l4IS9c+r\nbjJ5nLIEz9m9Uzkfc45qwwtr11l48s13X/+w5u8Qr/mbJO2Z0cerwieQQwj/\ne2iMrUETnEG4rrLmOOX8FCTFcAHEvw34IdfDqIwaHs5e6WXvDdZRrfSRoJoE\nCRXxuktqN+Vy8LqCv/1YrFNQ+Rx7Ov7XnjaGeTDEYoaD7h3cXHlePZKQhCuQ\nBZDt9jEwUV/fBZvtzZ4aYlm5h41CWNgRBf6OITSeRiDiVLUP5ueSn5i6R+6Q\nqPdrDDlr/O3u0PIz9LOW7AjuiG3dwfQDvnCas+UMqXhUyOPXmOjYSuKdBEk5\nhbaZ\r\n=Fe4t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4DX3EsIV0weNFhfB98p1YLPx9DhEKHFH1CxNrzafRbwIgdUnAf8Ahr9TZWIr2irmwDvlTqI0YS4X9DiCXZc6EFbA="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.11_1609276547584_0.5731405453284009"},"_hasShrinkwrap":false},"0.0.1-1491714b.12":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.12","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"ffcb71babbfaa76e8976759c7ce49a55b077d76a","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.12","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-xf8/SGe/1uufRNdEk3keANcd9OteilLPPYo9nSkHu4ei6uvMdMIkG/uIjnKhgG0dZFlpPTmGLPhw6fA5WFyTdQ==","shasum":"2eeb33b33f094276071eb3048f6b2b728207e983","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.12.tgz","fileCount":40,"unpackedSize":225267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf66ZvCRA9TVsSAnZWagAAjdsQAI6sHnBC1bMI8O8Hk+0z\nkeSEAzONvTQWmEggD9Af7CBb/cm02GCwC+gZJ6kLKTOQ2PkOPeQDy+BFgEx0\nSQnQ7DP/zZXRqs/CJODs2MsVR3sUcSR8nnqXwSpRDPMGRQv20OBAPZmz0AHc\nF27Ueq7QW2y8rtILUHBHkcvEVoxoWTwoguEnTZ7YpVAtcKVkOzGoRaBlOUUr\nQXiOs2KTI2CJj+qe2NX+5A8SUcXpvUNcE1JdqXQumD8VHsOPm/bUpXb1IRCM\noz2mH05Sc8lTxK+Ce6Jiv6joixSmxUAHTswdSX4ubblqSRQbMSI8hwrAZ7Kg\nJySy9HWQTqro0XGRtNvlWrP71g5rDU5QcKNj1yXM6qLRL+s0SKe3mf5YD+W9\nTHGS1XMu8Z9R8s7lmONSiCbNqQxfq8Q/vGoxo2fpHfz3t8D+r8bp+sZQC+x1\nMuN6KzbqClWFs0nsYTWf05l5dyGzpzqNnw6yw54ZU2JqYF6Z+ihhvzhOPeSc\nBi/Y5pQv1O4Nd7estwcCV00L/oMMR8Uhxnaj1RPVgFE4W5mSsg9pfFKYg44f\n3/BeRqxgc8/Fm9lfTQleH9EkpvVaVaGdoMCGvIxfk20QeFpzTWcJl/H22fE+\nhJ8dU2Pcx2cc7sYHIb9ulLczSqmz+F3wd/S4IMIp7EdDl7c1az2AQA1Hby/w\nG9xC\r\n=9r0T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDbROjDmSHKYXYVy9Ufw4ClxaBc2Wjz76jwcquMzXbdYAiEAhA8NgZlWyeG8GVXs3gs2qaVqOblwdHHDuliTMDcSuGc="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.12_1609279086899_0.2609466205584072"},"_hasShrinkwrap":false},"0.0.1-1491714b.13":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.13","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"f620201abf729ad497c574b359b1b54e25978389","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.13","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-Xjk0pSc5vuh4bRQ1Vjk5+1dNe6cPoWv0YtPOYy/9VjWjBE50V4IUyxC64DEkmXyUskMQdI/fjjmf8Lu6vGiN6Q==","shasum":"af6dea3ebbf4361579e2deb16f77fd9d7a9c6c35","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.13.tgz","fileCount":40,"unpackedSize":225660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf66hYCRA9TVsSAnZWagAAYXEP/2rV1pcvXqc07E2JMwTA\nZZ1ef4FJl6pPdD/bD9wPP3vkX298IqHiulFru1tqz7/PKp1tjVBmFu5xsNL6\n2355fDloDiT+TiKZ8cbIB7mrPqHT3mMhtxF4rBVEQv6Fm7K5eLCc+z+SUezK\nGOl89izr7CXvZ+CC01pu7eL8k4OQQ28MVw32KL7HhBiq7fg+H/VDibYJ8E/n\nzu4wewX8EhiQWwdHjsEZshCI10IwsOif6pRyEUaRCewyxZKukxpMIZ56CGYO\nPSwXck44N+D/+t8QEpqEvDZ+5Gg7kCGv3LQT2Y+O482FeFljKvJOEwokipgb\n/bu6rUdzm/oQ9/6O5RBWjWHk2oEt/dJ0d/GQXpqMkWFOmg+X5NosGoE6Gzne\n4ee8nwVxer1YtpLOz2fYuFJ+9/Lw/0UKdU/OsJNgpQyLZhh88hTKySu+e+b0\nhREckBPqkQGr0jVNo6W+8aBX4Y3IYWw+Mzv1JIsOf6ru+ekFVfWRppwBe3gQ\ngrymWGMlIrmagzYVHKRH4/ZW9kO9XMlMRJLdPKVr5BW0+nAqD0MV8yRki14d\nia2FefhmCVTEYjV/C00c5lTG+ISq1SYyp0L6SYAsgKZbYfcrTZ232ofYzhmk\nURYtkscQGhIYAYkCBkFlGcX5lPBkfam4ptAVcFu8+t5ip9RxFTP7/lC742Te\nXLcK\r\n=NUGi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFzV4/fiSQR2c1YIqKsyywNT2TgEyk+pONiPAiS++6PWAiBAwMPvPvqtqDAzsWrE54LbhPVdVdTpONmC9KFqmTYwPQ=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.13_1609279575947_0.8686121177334554"},"_hasShrinkwrap":false},"0.0.1-1491714b.14":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.14","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"e9ebf81220aed3a486154eef5257cf499445c136","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.14","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-D7u1p+dOzjZrD4it/Z1HqkihPsEs3L5Abw/PQF/6HmSEfi3lZ0H35KNAC1fzvrw/HI8FwpI7saXCT+BYOwt1YQ==","shasum":"a0b631d1ced8931b5820e83efd3b55ec06326b8f","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.14.tgz","fileCount":40,"unpackedSize":225676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf66psCRA9TVsSAnZWagAA6cwP/0ikIlvZ8gIUTWCBTNX7\n/jSiCmTlc46QzNYn2KLl9ePG0m8Rxrce5/l6V2DMNDjsL312+gzwQHWduwOg\nVDZ66uPMN4BQK1qjJOiLm+R045wcgjXDdP6OkeV8KfTU/vmTbIypZ+mlaYZJ\nkIl0xP1pmJKyJsRwZCzOuu14eOfBPROfOEYVuVjQab/EQv1LOu4p24vsrK39\ncfUBZesvtY058zc4wzz3WIaaHAI/WtKmgov5usR/bMQVSz8mwSroyH85K1+Y\nWjggqBnEN/LHHxQDM2QMhJlO7GiqOlGNYPbHBrsoSPk2wzpPs7ESbHfxBtpr\nIFE0xfHntlAT8fYN3bgCxAv2WlHxFhaDJOf8aGF1Urpj8eqcnWPP0iOwrKM+\nP3mhUQ8rkVD41j4CqZ9j3f4L0awdo89iMKLj4ZeqaPmni8dib69ReM+QI6vG\nyJZUvYH3/48pwqkUqL63ale7Vs19vXrnDPZ3zHEP6k+hF2Vpi9qk90HkFVJG\n1mu/rsM/D2T+yphcNdwLtN/1y57yaQDjDqt5dMuLh0IzVLPiu5YDiFNG682s\ngy28+JtR/X94pRZ3PrMfb07WnX7p89NqR6eWoOc1fjRK2z/KyVnLEqH8teMM\nz1vPHVylX4pwIKK8jaayFC1jlrPKElqv3WlcdhmjytP2SsBFyeV3t1YULe5a\nYz95\r\n=T4ja\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0yUrLZu7Tw0XGwiiuxg7mIkSqIgupUPhjWqfQ1YmQ+gIgcWJxsmIaqzbj6EcUr5ER8FUgSY6I+eiFdT0ih4cR1Go="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.14_1609280108349_0.9963232336514363"},"_hasShrinkwrap":false},"0.0.1-1491714b.15":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.15","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"1e3bf1e3180320a2b7ba95a892784daad00d7a47","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.15","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-c70GWqGTmiq37chdiP9wXpl9dNjn3NqVSb8/5OzZLlbVqvJhcoag4+qVNOSDjWUEW0y4EdWE3h2YBOSxEcmxfg==","shasum":"d60cea93dc211a2675f9732dcde9bd29aebd79b2","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.15.tgz","fileCount":40,"unpackedSize":226018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7F2+CRA9TVsSAnZWagAAu2wP/2ifuUX38I8hzhrpiCFy\ngaLW1phc9Jxpaslr+tbMEWMJtw+51Yo0t5UfQBZ/EzqwlLdC7PREVVeKJOC4\nKp5GsJOjBg+0U7yMg9zir3juQfaDkltJ5q3ONKW44FvM4YzZf30H58YafG0m\nOIRacDiD8AMm/w6+GZXmPqnlOGR1SIG4pUllV98M6G7f282AUpyTQMye+XEL\n1fTh16haL+icVr9XaOA97+9UTOXDpao4qtZEWF84Xd9zSIHgjJyJjBXXWWB0\n6lkuZtFy3CgN97y2xTMzEtOGvYMvO3mX2f4PXaIMwbp2cOjt/loAyWa7d7Rm\n07Hp5mnkH2a0fojIO0EKppj7eJbSBdeIi5t2DyzEEi2WqBKUTywgGfsrNU9I\nuRPoFtBzbC6ifR6AzPqvg8ZN4R7IzqQRVApN3I2tnbze4ovLnCpaBPBcbkH0\nsDYZMv3y/jKATWtYwNdsplH/lcCax72qhauu8X5Y72r4OnrRLFWfXBblwJGR\nBdpIiXT/cg6zE89T+wWN9QQF+RWLhsY9zj5ncyE9rkp1r2f9TDcyB9/l3PUb\n4mdlA9KUD8qJ1eg15VnlwZ3t5jo1JQraDg8SkXxxQqifZck7iRiWF/sarcIe\nco2H4d8hjIWHDU1RwXHb5BgXJXEQ9h79A6OVh56n2L8K/wbc64Kk6+Y9hBP/\nSJ6Y\r\n=lkow\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/vLJsphkSTqzjem7D+V1kqK2D0ieJ83TGix/p9O/W6AiEAjbW9dYZ0OncHr5bocGUSPvX8GJZSlxOVFCymGV2leRs="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.15_1609326013894_0.23644295343446986"},"_hasShrinkwrap":false},"0.0.1-1491714b.16":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.16","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"8f79d47ff6425630198b5cb3379624da1ee25802","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.16","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-2me8IQQMreT+raT96Ss+35p062p8NJ7xpDuzSsjPN/EOK/wawA8MXxBM73Jn1+zvtnJrDL/4qqLVBOyE6OLJMg==","shasum":"9a5b3b6006874f0b6ed1e0d8ae2341e7dd035d61","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.16.tgz","fileCount":40,"unpackedSize":225977,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7F9bCRA9TVsSAnZWagAAwdkP/Amt2H02FnsHlQiX1CS3\n+xzBB52f6HglBQwa2Pd/sPyfHaBxUmFk1CwTBgVZmG+ng4ajqkiDuTSv/AMY\nM5j44cDly/Tp4rwbFKyL5riG7dVlWSbUUC1/dG5nmTozpSRJHC6btvOIWf5V\nmfkmijTxfYxZ4rUizOJEeqMW3GVVGcL3yqdM3P/+eLAzwWG04Wr0NE5GOmDJ\nNLZMr3yIxEbqQAA67CG0nY4fiKrE8hfs42QmOopQxQl0Kc2EkHtNNcRCpIZv\nQchOaLTggMg4STEswP7FyYmGwerj+4oeVcGKmXqe221kKdj01CEqJ0otcHtl\nL67VKh0DEWnwVZPrAqkPZDSeVjaV44+uiF/mXRCQO1AsPsGx28Bk0CVlFMu8\n6zplNnlEdp0Syf6n1lB47gREJW/ldFivgRGh0mIPUXUWx6FlMxybD6bCgVgP\nQbosqz9z/R2eZ3+jcwp9JnTOcwMH3DD2STyg9xgal39FmAKwWeHOTb5twK6H\nSoeAEY19elES/a8NQj4pC/5VNRcjVwmWl1I5FdCy0g2/Fb6TljZBUTxX9rZ6\nI5DNsOlGdpqvxYJA0kutRmiVuXxtjd+yLTbmqOAkVNaCjTpsU/k9eyLEuiyK\nNcfnr/fjTTp3FnGLbNiLmvJ2nvnT/VOTQ2dS+e+W0/3sqCPou3vMj5traXHk\nOWHV\r\n=homW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzjxPoaASg7+6aZ3ml/sxamPpcxm2RMxhAHR6B0ACqXAIgQVEPCsUGmtf7PHzXFivOZaICP/oJHihwDyg/kc7zvO0="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.16_1609326426615_0.2095121358515839"},"_hasShrinkwrap":false},"0.0.1-1491714b.17":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.17","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"7520c8202bce0bd42a5d60cdd0ecf4734566b023","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.17","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-Lc65/IWr1aMlUwBZE+ru3jl882wpEg5j1hikSe6fpOvQ/TpYpNj8prNNZZwTOUoDVSG6o10Dh9tR1+l5/Sf1Ng==","shasum":"b46461e7c6bff30323c27bd1755fc206c955b6cc","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.17.tgz","fileCount":40,"unpackedSize":226235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7GC9CRA9TVsSAnZWagAALs4QAJTI3UeCn/fj21RDLsfj\nUuQuIFfL/R17wRWdlcpN+FOF2yo9hUJTYcu92ffOvv6oFbei3a7T+tn+G89G\nHnkb49cZ1Vk9yDwkzJuun11e24hggw2g603LQSNyWGQsXAQEGwVsViD1VKy5\nkJHm17V+FCiAC/LxTozsm0kkloqdb46z84blbENuCow8ecZrL7M2atyV9WdG\nggAPmNKdAYP61HQn33NLbPMXE8RxuGG1X6jRrgMm+jAdxUZGT64+R7J87OTZ\nPoOsUBZOgCr9vwO97D29VuwVte8av7RiCPthtx3O0eBI8IAUK1TKz22HCVGZ\njJiTGzTI+V3MvKh3xsr4Grsc/LZqN3bePqofbZOvd7Orx22+uKMs+o/FFQbd\nlyfhFmQhQ88vOYCvXHva2FF1QlYa+WHefiNNxF3KOcI4ikzeREGfccc1b0/t\nqBOUFzlKMT3koGvGxIC+nw6DgBo2YEpPvOKJraY73kCJxDdvJGYueljBwaqu\n3f5lDBDzhAg/J3N0lzAc3dyMVHyhMAEAamYobbD7MCCqaIRUx3MMifAt3CYo\njg0g80RZzULMGF6XDm3P3rFgM2zPXfhYP48tcc9Fymse/Rbxx6SN1XxUuzRN\nlZ51kIeA+itlx/INCFjPKIrTLWOEBnQgrEoUvzinKp0LKuTxHlsPiJj5dfeA\n86XE\r\n=RUSV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHjXWRCISJZG228ojeRClvRSzRpa6CkGrzrF6XXcApbaAiB2fF1QR9jgPWScoP7s0x0WFxtwqaZBx/NwISQ6X8sVfw=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.17_1609326781244_0.5620410713737818"},"_hasShrinkwrap":false},"0.0.1-1491714b.18":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.18","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"ea582d7b1179d47f3e5c7287c92388271be2a835","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.18","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-R01XbGwlWxq6//68Sce9EAEzqYzj9rzJMhL+AXKTnQiqgmjPmU0BzTA7HND++6VlXj2Z68dCjgAiTnZ9p6dO7A==","shasum":"6ed777e5c5c13abcdb36055748fde08752e388ac","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.18.tgz","fileCount":40,"unpackedSize":226405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7GfdCRA9TVsSAnZWagAAHeUP/jocT/KjU8AN9U0wnLcg\nbWzUzW/0aHSKrLQ6qr47V+PZBU+imbe4zSjPq10VPmy8yvPImo+7sGRca4ht\ny44I9OqaUOLlgjoIqmdAuMpFeRt23InsTanpJaCO0pQqvNjzKY8P4w/V8dBI\njly4Exn903GasqdoIIoMcT4+jQPHsYedSmS8a391xoc4+BVKY0T4U8RclUHS\nG9sBp52Uoii4L7P5M2mGQyX3MdVRCoOoTHYpCbyrMfTaPtciqBPiWXSdllX2\nobRqIeOQA7cvj2pvXWf9EZT4V2303qG/VBm1ORD8IwkvCijEiWbRHzZkunT8\n7VmzGBWRKJuT7iwwZcPlJlBoZRwXxJUq1l83MIpxECl7ruWgvJYblpHDmzwW\n3PxcC+SdqIzl4zPdr3FZIlxuslNYN+jaTwTHtoZ/HmCO17kcU350D9qif12p\netoZDphUwqtsXwHa4p4OUbfwjk5ZHO3OAd0edjka8rrbVzkl2xGTp/Z39RHP\nj/r5RWLz0hVPeHLIo+/IvWnc5/Ij6PbuOaxb5RJA653xe1606xM0OLuJApNk\nMLhUVNEe72Dn4Tq7U5k2XPEW3XDWiDa+UYVVK9+ubjSpVkuGhzdQCMYysLFE\n/uabUVRnPvf5Ri7k921Qo3ZIaMeaBbOUXBuaBXAfyRY+vMQvbfCKpLjhMmHO\nOHoh\r\n=DdfF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCg+fyNbVV5jG5IxnESYlYIPa+DnXpbeBMr8XLdGYuHoAIhAPnkKr7fVTj4r73WWd4/BJ26HrzzG/EXFqx6iRjn+T2k"}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.18_1609328604764_0.9073194616087057"},"_hasShrinkwrap":false},"0.0.1-1491714b.19":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.19","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"f1f1d9bd05cb11a6ba15f29097196feda1636bec","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.19","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-GxCgmOOAtrVCq89SI9wx6H+FzVpIPhgTwj/B7X62KUfUB5JmIIZg+7J4DtrPIKhD4+tpaIt1oZbhADJE6yNxbw==","shasum":"df74fceeb5044818ca820f03adb22967d71c5662","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.19.tgz","fileCount":40,"unpackedSize":225324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7GmNCRA9TVsSAnZWagAAgTsP+wepNZeIvX1w6niOcVzF\nwT1rdm5T96F2YbLDCllJEr4EuCRudm85/5sNy1lxHvBtRQ8jGsqu0I7dH9uk\nB2F4OpiDeHG0lVqEWwvPibReC3lxjDBW0VXOMGylfmRsb5PX/zft7JKqzaFG\naBxPCF58dQyQ2TToB7XAZBD/cSz2wqzgvaRrqqZ3zeiCMu5L8wdb7KxfRhSz\nWZC5q7zgWeb+Qua+H01dubtLny0IrK4o+LSxkJLzVm1iIhK/sdnBUgzkNQLy\nyYd/rGTx/tAr+qxnVQJLT0q7kmowZ5pI13GnkqKFAy0vuy4RFaFqzbEO0oxt\nYJiwSls23PHZ1KR8UQqts+IhXxRjFqEk5330T7E2XO/rlWu8vn3uxqw7BNUT\nwcOc5I77uU3v+cunM7w6+iWEIYJRi5EJompYjoMDn11V10gyXGusa7PMKMUV\n2oMYXjFq9TMMeck0+fL9Frkgi6PFCw0aSvpr0XOyfVPrAUe00+uyJyEGOdqH\nhhPif7fJ5yWTYjhqm68uo34k6CdzhWVW2wzvzu1ACqSnHZJSyLxaMocFzEj5\nP7qd2/6ffJI6zNOGFShjgJhGqbmMzPvbnSXIsllLKmdzLXkplTaRyBCFtJrD\n378pt9UDxuCQh45wD7yzxHKmLyg7Paiqo+LbWGcJxQd5aiqD9TzIEeGWhgd9\nVCSI\r\n=G8iS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAaKYY++E0BdYys6xnZmx9GVTAGi9K6g4/dDZA0s/pAKAiAmKPGRjxE0sE5CQ5TYgnUAKLKbCv43vtpbI4IwPn6/QA=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.19_1609329037494_0.9648155727762147"},"_hasShrinkwrap":false},"0.0.1-1491714b.20":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.20","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"e06f23c974ef7ba05221dad0d5cf9566d2e74b46","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.20","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-MMx6s7u3P+7NNto9BOy6A6wE6RRk4vY8lZIjc/xQHLjsbCWhSP+RR9+t0kB2+K6bs60uigF+6cej4qNkvqCr6g==","shasum":"4026d41797785dcd2320c28768ed436d5b51cfc8","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.20.tgz","fileCount":40,"unpackedSize":225275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7GpxCRA9TVsSAnZWagAA7GwP/iwv3m6YU0DR59TkxGq/\ndbhIxEaLEap+tcSbowu6PIn1WneXr1tgGT+yn+o+DiIBUGZt6/7YOxgRcI0G\ndTnQyJYWqlvcMAVNX2m7M+9+LMKrPWMzhK7UYpVGmoXZnS7b6pQ09N05PQYN\noTPeufJxxhG1bQyidN0FvLkZ5bJO9GM6MEO9RddcA5oFByXSK5uVoTuEKmI4\nZ1z5XRREpr16lAlpPpIrSfdt0ic924YgUSaD+K7m3LyiyLmAhBwf8x2OaGzu\nsDxaF7xl+opeuN0qcPR05i6p96pScWD2Q685VYhIkHOObnwaBiRJosrwcPHx\nLHoSZcxoEjQxhpM9T4eZZlOngVHduv45rpb1zI5usE6sdY3XsCnhRFYPSFEo\nbrQZ/kNWWd/l2hN48t4fIlVySlmEhhaa085OMih9mLxeN2ZVaQfBqa84NGi3\nsP7wyE5bdc8UjDsUTm9IwEWcdlkNn5xotWXxcbcUYaCbqLULBlDZU29I0HDQ\nceFYYqLtQizOTE1mZ8bTtLLvtKY4bXWJktnauii1QcTiEwlfREfZHCQ9YgVW\njJXkE3S5ZtPzMOrYlcreupoIDr1Saxox+fxG6cFnvDFrblPyhByslofWuOYP\nWMTOxCOMRA5MtoAed+OjYv4dsNy4qK42zFC6uP1JLyGYWxQnassVw0NA2wW+\nebGl\r\n=F2Q9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6Kn6HCgqQLDKyR5hEhRNF3VwSHyLdW8IWADqy4d03wQIgIfFL0k9V1F7texc8lQtS58dOhzGLQVWMigcE/ga2Hjk="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.20_1609329264578_0.8651051759548956"},"_hasShrinkwrap":false},"0.0.1-1491714b.21":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.21","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"00bfddca6aed4873b3f38b925ad18bc5c7b485c6","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.21","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-/zrswtNq21pdme/J0mT5qQWQ6W3K83lxKt/br+MU+PDO7trGOpqhQN4+mWT+Dctnx5RqnVg7HIHVVEjayfyHSA==","shasum":"b7aa22c6e657aa1f3cd2d16c7ef683715c081292","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.21.tgz","fileCount":40,"unpackedSize":225159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7HL+CRA9TVsSAnZWagAA2GwP/jw66KuzACSaReccDw/1\n5bXXMiIvH4nlN1pp/udQzz2wOjvFTwk+nwZf7lC8RTUQs1JOLkgX8Ny8J0/c\na/MrQS+J+BuCl5CpNys34rfh3wFp9b4+0rovEVtAM996cg3yVEQ+ARly4zHW\npsi2CVWJRjbattPB5n+dLcgo3gUTFL4/DCJAC+eM93ahgcpAQeiazX2p5T1N\nKiVZ/eH7xEfis6esoZQRUiC1dlJCNlaoNF/13Ki6j38VrtPw83/4Ru3ZlIfz\nE7QEjAeNTPfVRYjqnpRt499px/5832WQvABb63GHXVDXVCG5G/YsPRKxho/k\n6750O6MzYJrDFyA+4PbGYFZ6fzu6SIaBmmv/MQu3DA3wJvW9N/VbF+c9kDhU\nzPWxDN3tu2GvgybxP9GHi9bDwmC0G4FUnBgovM0RD6ptJf9eaAsiDndY/OUu\nrBlpnsp+CVV9n+nqtm7LJDNRij1agXItXcbNWesg31n7WT+faY9l90Pbov/h\nFtITRyKQ6Bc7PASMh1VRRJQa0QNrZyOE2hRN8E0mN5XBthc1vAkzHrZ+A3Vg\nDiO3GmA7Wc/f1BmvBJ9L+65mmu0dVY6lok3o3xhgzZ5rXBzHMAfoXhMPuBLQ\nNAMcApJUVrH4J9YI6C47RqAUGgRU1aaqrWMHGUx2zd/FpnqjAk34wYxooXDj\nfYgR\r\n=KhIP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDy0tOqH+UV9DrmMo5gsdHZz3HBTASkKDvRytmPPE1QMgIhAKtrf6PiO4spV+fv4rwEfS4bekKPbYh0miObne2Yrd9o"}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.21_1609331454208_0.3426077764032982"},"_hasShrinkwrap":false},"0.0.1-1491714b.22":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.22","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"d22194b5acead3e6e3e14d399df907f4a07a5722","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.22","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-h1j8DfdE0EY5Jk3IvnV7J0C/y4nNLlhuViQa8jADa7Oecmo7wkUwBoU3VFi/ZCovRrxujj5yyoT2Dic2ZyYz0A==","shasum":"1f735d4f30ddf620528b9ea32fd4376c5f98b9d5","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.22.tgz","fileCount":40,"unpackedSize":225759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7HYxCRA9TVsSAnZWagAAuBQQAI1yt3pbSZcbEW78RRN2\npDi1/OrN8U2ZYa6v+OJFEZ7YE6fhYQxyznPdXBTH+53L47LdoS+if3DRvTev\n0s6OWQaoUDczB/2StnIGBZIm7iIiYiDEb2AjioPK9amVyl5GqivyhWnYGIHB\nT/skusOjwAEwPDeP3/QWhM8dOFWymGrwGjcrzS3Cr0EkTGN2zm2KBVEFAPTQ\nIne77viu06A2HtG2oN/V+RLSDDQR6TFn61ixkUMf69G/P5tHnNAwwVg5WPSU\nWegk+7n5TKDSSnukw5+b8BRcAI7OL4Pltzb51qyeW0LEYO9Rpa88axfw4fWw\nEy3wpmHXrXAKjR5n71YKItWmvl1ZQ0v8nKw1dF6E4Lxmqy46Lb4E3VJ5FHUe\nEBwN5sS58Byk1TkXEDenKHs4+9330VFBk+S+qOfEAT9+HA3GpoAAD3Nv9xBe\nKHoZG5ojD+EP6FYuSJN2ItXBnBzF/sZO9BDAYdQICfC5HiwhxQecMFuZiLps\ntxS8kyEfhJTdHhu14qlMgkIw8IW9c3trBrgwja8zySsJX6Z75hIMAsvS1IUD\nxIKPSMAY+AHQE1AFQqKaBKyEzA68DWMY1KjD2oIc1qFZ0vn1mOXKo7n0Xhv2\n8huR5OgP0cWaV45pXBPDCU8G8YKLGFTucxGHRD2MBeZFfPk4z/KjIArAcRxL\nUj7h\r\n=1JTX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHjDTUbaRGcvr4EOl2+B0RLXN+Q/Wq7YkcACySNSwKyFAiB1hS0PLtoJsfeV7W6x4sqBXBZwwDqfhAxLsPDdzyIOXw=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.22_1609332272766_0.956346826890432"},"_hasShrinkwrap":false},"0.0.1-1491714b.23":{"name":"@animus-bi/redxs","version":"0.0.1-1491714b.23","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n","readmeFilename":"README.md","gitHead":"ed1686930c91c2cbed7c49f24bc1b600334fc258","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-1491714b.23","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-zwJzhCg+nsyAKnmy3vcY4nDJqUFP7LowN92hCZY//1Ol8b5TcvTaSbiJnJ9FH0T1GBpmosfDF3WzBxolmQR3Vw==","shasum":"74df9cffa099a19931856e67400d9e701593e709","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-1491714b.23.tgz","fileCount":40,"unpackedSize":225773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7Hh7CRA9TVsSAnZWagAA/oYP/ifWO8Y2qugf+vNagF2b\nU8+UxDE5I/NogpGBHySjAWV9hmMwFzO1syXzRUv4nt+JXmnD+ilsgYF/4xjR\n1G6U23F3/xbmslrM43NulW9NOHKpfHC24N82F3PVvI+zO0XwqoJvISAutmko\n992VddiQNWOMWmAKO/comDyHfxuPH7D3T+YOBjbuYeNPryA1KfM4jYbDmdO+\nV34GmBmHb/NjPCm5rVH9OxVBc5qA4mH+VlaABm/kp2F6tWazkO8HMe8ZNuqq\nANhvAyDlMKkMOH6jQQgP8ji56oEZjXhcB+iNSVaMPlUE1/ltWt69eLYJYiVL\nz9g+SnVbrOlH0sNE1ris0K592tYb0N+u2ZXwqhA0czz/Q6n4ObQ1TBW5epS3\nDDcNVzYrsfGUFPVsr/8n/6NAHRoYJ2aMeCxVpnxh+ITNpQcZE/GbG276l3y/\n22uFQwodCdSHQgtJdp0bhrSmKZueZupH3AlfFluMpyQda9qkRzAekhIPrjKU\nj00Y1SmParvMXl7YchivGRCiKktv9Ip5/9dNPxKVFowAR/RTk/0WmgdLAaAm\n1xmmLRPA97jBQYaVftlUiWNSeVwUY2IN4DVQAfF4gUatkdbkc7LAy2H1IoEG\nQ2YcZGrmO9w2o6KQYnyBc0WN0BdMwRlJ4T+bHLEisi0iVx7ZaU1vaELb6ta1\n8BK3\r\n=SLP1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNpREG1KdConFwyrpX+s+26kAb8tlH7z57xOTi3L2PGwIgYhfx1NTrQh6xnIWg+lEUVQGb59aVb1KIhwwAWjptVRs="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-1491714b.23_1609332859324_0.04837044879287289"},"_hasShrinkwrap":false},"0.0.1-beta.9":{"name":"@animus-bi/redxs","version":"0.0.1-beta.9","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"d98ea6ee1988ea084d3155379e2cfc86bec2f27e","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.9","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-Lwz5nYXxTupj3PRYHN8Y7N2vuA44TeIC1wjBuap/1trTKcg5zjo01fWv6COAJ6ILlMQyXNQWZRMM9nWg9ayWvQ==","shasum":"f660248fbfc272feb0558c25b79b5a237a8ecc39","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.9.tgz","fileCount":40,"unpackedSize":225508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7J2MCRA9TVsSAnZWagAADysQAI7uUKA5QKViqrLk+Nij\nCztjZvMp61EPDjCt2oyfHbjjQKcUEbF5e/Nxj5gs4lyTE0ay79FlASq/aR53\nSkB36rEFP9EA1dloSdPRVguwh8ygDjvBFM4/5G6LFgJoGJ9ofn//3zSlHm6/\ngyIF5Bzbqf/1ls9CKgF/7KU3LaDsO6IoYXaj+Y94/ylnciniETvJXsaIo9pf\nXTZo+ZXGtG+eXk4TNP/UFS/lhTF2pUh/EkCVOJawgktHz+vyJeCMDSqov9VL\nwyz9CmjBcmX0bK7hIjx/oSJ2tZ+zNtmuAlJ6FtVT+ZadSkFxPPrnkSspA9lJ\nP74xCU4fi1ZY8/c8tkon71le5Jkz+f5sZjG/gM2Cb+ndBZgpKlZA23YpJT6N\n1yjN0jaZUjPdX11MtmO90rZWvUXZ5J171ls8yOs3xn4HNDSMHVXvcVDlYn6F\nNjC6yz8DOrvqykAm0uGfPoFAEqHG3CmVGJh1m5g3sPJOEZZ9egaYnZGEgaDY\nh2DuAlik+9+ULiE6z8CnglfvARnHb2AY9HWnXHeq6r8esxrDSWHedlWyYPfj\nrMair8dVtFBfSl54ZxJzVY8Fv8m4EMTXBpB9nOvFSice/PKmcm5Wdyv8p4Un\nWZhGA15JvtHlv5OGqRehXzLltUgs50uj+15YawVf0YC+DQfCEXJ9sTGTzwOZ\nIO0q\r\n=4Ozq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFx39rJvOOSXaW+ib0wnjkZM55nriFi7VchR2lknFQ5fAiAu+JsV8DOsFnbQU70TwFU1ScuQcxsEoHlUOaK0R8v7EA=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.9_1609342347887_0.1798493022272043"},"_hasShrinkwrap":false},"0.0.1-beta.10":{"name":"@animus-bi/redxs","version":"0.0.1-beta.10","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"1c43558378c02eea4961de0efe281d3c1c23cec4","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.10","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-DImIFgyCc1XGJiTsBiJmOG8FLtG16+E/50MB5dfW5Od7VYFT4KipX/vRs+chUwb4rrDZWImo/WCkO4RD7UA4+g==","shasum":"f7b1178c97251d909f1c568ad53b024c1989c372","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.10.tgz","fileCount":40,"unpackedSize":225509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7Ku4CRA9TVsSAnZWagAAL+0P/1eFu594G7apTpzdBneC\n4IsKp2Hv6PypleYnxbxv/d1sMxkyKr9Foy/fkA321gH90pwE8Ovm9f3anLi7\nZO2jxFXtmcuFrM+BK4/7HSaVQ98PayTBybG7QPpwPbUO2uYHWcQEA0mXQBjP\nM1rGwa9aJ6K+28GndfZQCZZXzgma12J15ywcxvBOZGpypbqFcHdzrf8wUJ6E\ngggt/uik5D2+kaavWfQrgqaxGcioeA6ToL11SuXeNK1hLrrvDX2VlDZnSXQV\nSiwQeQ7dJoV5mwcr5anX+N20kZp6IpNYibUdZ+XpkQ+qh+tSskxVpQmoFUlq\nB2AUWyqVCU2q4ixo02l0TA+NnLFX5EfrqFU6vTjGDNciKD4DpImXp8lPiURC\naY2ghpBzWPRF7roSk7RmHrLMuq+BwcfagDjL5Yi5FlB5AYE/qKv64f9kjisq\nmHTl03+OAAWC2ktgGnyCBNCSMqi8blFvLvX6UyUcMmkenp4/8nyjCOHaqLXw\nnxRd4Sajpkp7R1ilkSQz3u6TtnYYrGYpk/2V6aGyVk4g0DzMH9QDhCEHiPYB\nKIDunIWzaaCbOcHsz2C0xtGXAXNEv0TxMWxPXELSOsiXZpPyIsdBPJ4gpZff\nNo+v+GxFK19qsQd1BfKspg40ceynmFOY2Dfm0XZFFJ1ikfN9VkR1xQEVgn/+\n6B0S\r\n=0CHl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSwZeCIJEjhzjtPwAViCZpJ0Tdf+LEmT6DsgOwR7D2WgIhAOcQNeEShqXIom3iy5+rpZjin2FmdUEiCNpm3ubjYq5F"}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.10_1609345975848_0.43450873344621455"},"_hasShrinkwrap":false},"0.0.1-b27e0336.0":{"name":"@animus-bi/redxs","version":"0.0.1-b27e0336.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n\n\n","readmeFilename":"README.md","gitHead":"87e80fc68d1098ec6a7d97a7bc1e0873470854d2","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-b27e0336.0","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-eeqnCWufIYcpCYmkmFDg7uZ2VY/9ciTyXu6nuiy/qCfzbJ895kRxx/qhi3xBIaxEaMYc0xXJfvVnevmY8oJTAw==","shasum":"9d0107c7cf6bd96218ec86ecd33dfae9afad9661","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-b27e0336.0.tgz","fileCount":43,"unpackedSize":229604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7L6dCRA9TVsSAnZWagAAx48QAJmmETkglrnDj/kwYDsE\nCi/JF+QgtA5GXKcQ2I2sE11wKRzdg2W4rR4ZZ3Lz++MqZtbOi0m8RrzYp3pd\nocdXZT76E6KcLnKpzCf4nUU3P+kkwQ7gQF/GYIWIvOMP+TVW7MCJJ7JSO3h/\nRK4eGjd1apDd4EVvHKJ2020U6s7rmYyOdpxErW3/dzCMNzD1ngnuTgslCugT\nR8UkHUC+JJP2hpd3If14KfpPCGf/+tdM6sa2BNc62fzQEsQIcJZ7ivsMWOO7\nStr4EKtqoHsNdUuXvUXnGyfQOM2+zDwsIIpkqV9BJWTNSPHp2odA55fpZAjB\nWC9b1bwrIM9nuSlknxKZ+XBv0KuaYM7pfUMdt2qWWhdw9wj8bJZSgS6Tv9Iz\ndBbU+KGO6JKjBi+TgQg3oc233duezLlIXVIf0JznL9LnaU2cndJmMU63cfkg\nxhBwH3nU1enEWWrqAiqVsZ+yjclCii+oH5AIi89BYW3OUL3ZRlf42wOydnsH\ndAUEIe7Ynpc7mOF/9xdBmCoJFXDGS/FRMOhFH4OBQS/waMS/BBz7EvkKVSVU\ncMQNEecTLiKmhbA5y/PIBkqQfBJF6sbIIZzjjEXowmQI6IqwWDKEl8JDcCNG\nD6SbFUwKnpucMaaDYhqmXnUzpg08rT4k0vdSWLo8s11CibLxZ4RPR43ji9ed\nx2Xw\r\n=bQKb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+3ECZNOgfK5psvIpuXsZzWl6ybZhuxz+hyZlNPjNaaAiEA9TuZsleC/tiJDuCiImzs9xaRBxwv0XkTBTkLb/tRd8c="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-b27e0336.0_1609350813114_0.6999666383196765"},"_hasShrinkwrap":false},"0.0.1-b27e0336.1":{"name":"@animus-bi/redxs","version":"0.0.1-b27e0336.1","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n\n\n","readmeFilename":"README.md","gitHead":"7a792e8b2e2700157fe5fc95e96c4bec6ef0cbe9","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-b27e0336.1","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-7Vv3K7xzPlxqMjvi154y27vDStCJxtqHkuJGGsNpWDgTYtVRcnDJxoB/OjpSMY1/3xhKNSwtymZUpB2G/zAZKA==","shasum":"630bbfc22bd60c8c19086fe41ccc8ca5646a4c19","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-b27e0336.1.tgz","fileCount":43,"unpackedSize":229664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7MbBCRA9TVsSAnZWagAAI04P/2tVBc9JL+v443r2JcqV\nQHgjgg4tRQl/Z8eJi7d3WTmL/fZc5G0encSY4KVOeXPwxR8Wc52q2bEsJEbS\njinuKTI8fYtA4w6Y8GjCf/H/bYDNyUGbt/MwdXSmHpI/Om3MZkuFxkuKLB5v\nJ2nLSEnh00syf1k6fD2J93y3cEU8R8r9BCYL8qC53Dqf5H0c4dVeVObDRP80\nCu1v2Ez01IZ8Q18IgKCVc/GrBlQ09REfV6mkTK7p3WVifosLaRsh0s1Vv+u7\nyyT0ihm6J1KPV5lSOOBzmEaFt2U+loWIktV1d7S66agN6J9VXelosf/e7hcN\nv+81eHxQ6VkepFHx1vemxBBHJLXltes3WCSHqroVeJhrDcej+7tAs1Aqvuy+\n017esevP56s0Xz/CSDlRi73ZjsDQi5DK+1aEDHdW750kkxhajvwPpEsIkyD6\nRzpCpLs5xDnxFid12X2GX6RDJYjvTxLapYyXItgLVenC7iDERRlQetSFoMVL\nTQRbLzcghbGn7LwS22gEQ7SGThDOKPQj7u+aJ7koYtnXOAlzURq+jvMLjJfZ\nZLLFsmUZUr1K98mvUwE7C7EqBOsP5BKog5TYp9SwZD3yAYlTZSv4JRxO2Lni\nkiw0OJZUyXwT52Ezs/XWammQ5/9NcHdIhRf/2cvOHX6VC4xMgQmfe2ySD75T\nJK5N\r\n=+i4i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFmyv4hk5Zz/uB68UhLA+OluxWQ+/tGSr9Jrfp826xPeAiBj4S8y72w3nmvihWXNEn/tsn9p3Cpdbga5eSawxYC5sw=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-b27e0336.1_1609352897188_0.3205467119283014"},"_hasShrinkwrap":false},"0.0.1-b27e0336.2":{"name":"@animus-bi/redxs","version":"0.0.1-b27e0336.2","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n\n\n","readmeFilename":"README.md","gitHead":"805314ce3ebb35e5e9b3b09b3aafcebc5b0872df","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-b27e0336.2","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-rm3EN4xm4kPvrXraIbmOZwm4ZHtAnwvRrmlMklNiDg0pRz4LMQrM+IP1NrqyeDx5zKbCPKToi5j21QLmcjp7Rw==","shasum":"232321f34ae9d79e4bea355d205df577aa98f61f","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-b27e0336.2.tgz","fileCount":43,"unpackedSize":230906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7+Y+CRA9TVsSAnZWagAASeAP/RMntoRs49BVuWQs11dI\neGsWA2B0jcFVChnedx6raXeDRI4GziqZjK1CQbXSoW9LWxYZz75zOOiqjdRL\nfLyPuQTDABQ+P9j88KppGUlctG6AI27zV1hQpEMUH4Z4Tl4GezApcwlSEgKD\nhSGJsNhBTECa4Y+TZ8I/coOUCyk0+4d3Dawg43anwg1WzZqIWIF2ZMCx2kFn\n5FNkUVs9YoJS/ACcPx3aa6O2GeS9S5gZEEYu14D0uM8hk/PgyLUjk+ysiVpC\nbtKCA2eY+JwTz5+cNoAIbOAPHewnjjqTvwS0bo5tV1p1asDKoQrw4txMSUMU\ny52u59jQddAFujxVywWO5X7ZeOg16soJnxpk3x6ZSw3B0mdhPkzUywAFRoBR\nZoF3neie9FAs8+i2Yvx938FSV7mrwrSS0Nyih9QXNGmi6YOzmi2TAi1PLp+J\nA39zMXiLirdoXmroM3nwiBxKJZeiUmr1+O51ZcVP9v2+zKjX8dEUKperHypG\nzBc1FX33jY5K6/owjqdUvdpb3la/GsUwfw/Z9BNGVML94SDmJNMFPobCJTCo\nQ/TsYQRwOYe7W/Rf5WcHORgN9A3PPIZuehGsTVJXPPkXuAlBIivFbCEQ+1xM\nwJZI2gtZFjTkESCYmpAaGnxPI7aeYnj5BfUr5RzDqvR5JyVSr8BzMf+0Idlk\nXHGC\r\n=fWuJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHv9+TwIUpR27/QHfpmnCaCj4o8NOkYhrxXSdG3rAVr4AiEA8KmFoMEdu+6W6lMNRcPr/VaG366fRrQGyZcbLOBbJqk="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-b27e0336.2_1609557566210_0.2637824327639666"},"_hasShrinkwrap":false},"0.0.1-b27e0336.3":{"name":"@animus-bi/redxs","version":"0.0.1-b27e0336.3","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n\n\n","readmeFilename":"README.md","gitHead":"ea18d912fd940500b23cc4056a7c47db41b7cb69","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-b27e0336.3","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-jCzH7Y8N+NNpVqUy1KD2wwi3qBISs0Cjm+aJowlzl+IKjyogYqU3R7ng4RHpNSz/Q85qGil2z2lqM2oigaAIwg==","shasum":"1cdde870ed0974bd4a99f930dfa99ce447693d05","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-b27e0336.3.tgz","fileCount":43,"unpackedSize":230715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8G5VCRA9TVsSAnZWagAAdV0P/1Kj2tvolJeEY1pcJk5H\nK2S5rXd0qwHhE/V0qsmAO8rsY+g+4DazAH5zoOEs7stJm1hN6xk3EI81S1bZ\n3jC3F13pzMCEAr9uMs2Ro8YJ6Wk38v80xQ9dNzATsvy7OCqfYm3JaMqRnNlQ\nJ3MV/m/zutOPINOVCi0pIOck4Iu1ID7dUV+y2H+3K+39d58iLPUca6xqtFis\n8SgnzKT0ipOpn1Yqk+bqtF6E22Ceq5iAsAGJTwkqzRrLfctJieJv7APmsu3W\n3o2UGwq4XEHR45KsCccmdkDgexPp3buH8k72hcUkoGxEGxgP1aFeUzU/41pr\nUfejvZ5E3EESrjki1t+a2hAjAeMOkAyVXdKm63GHhTxJuhw8Bn/YWww61/ST\na5YD2iFI7rLuCmQbE1oPWoERCE0MqRQ87X5IYvpMhaxdHhBHNuOrONtKQ1ZM\nefa3MbQJdNEG3e3BYqktnqknBXTABfo6fPvvoKFM7VynsxmGTyeV+DKn3E8M\nlZHolZNjmDMD/JH6/kuFMjBjPZ9RdMj/JieuYyWTsAhSXalLGkqR4DtIXHo3\nDsS09fMmldzVB9NfROxyOmcoQvmF6OfjaYTHGQLmrQ1INRb9G0LT3x6Mq3fu\nF8xwapB4RQFwX1Zp1g7U9QzMPz1cgpYVatZTltjH52SXy46Y61KYH5sT/9yg\nvSgW\r\n=hTG7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICA5vJKuYSNRvhxFm+nWNsDy8BI1ziqs/oFbHyRU4bHgAiAU/i21aK/BDpvn+/jNplp9CCE5QFESWyQ2/3Ie2mAupw=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-b27e0336.3_1609592405439_0.37380027729190646"},"_hasShrinkwrap":false},"0.0.1-b27e0336.4":{"name":"@animus-bi/redxs","version":"0.0.1-b27e0336.4","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- `Action`\n    - Any dispatched class with a `type` and other optional properties\n- `RootStore`\n    - Establishes root state\n    - Provides an easy logical handle to stores\n- `Store` \n    - Attaches handlers to Actions\n    - Dispatches Actions\n    - Sets/patches state\n\n## Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - The action should define a unique property `type` or `Type`\n            - instance or static/constructor property will both work the same\n            - in the absence of a `type` property, the constructor name is used\n        - All other properties on the object are passed to the handler as the action\n    ```ts\n    // store/todo/actions.ts\n\n    export const Intent = 'todo';\n\n    export class CreateTodo {\n        static Type = `[${Intent}] Create A TODO`;\n        constructor(public task: string) { }\n    }\n    ```\n3. Define a default state\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a store that extends `Store<T>`\n    ```ts\n    // store/todo/store.ts\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n    }\n    ```\n    - Extending `Store<T>` requires you to implement a custom getter that returns an instance of a `StoreConfig`\n        1. An example of a `StoreConfig` using an object literal\n            ```ts\n            // store/todo/store.ts\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return {\n                        name: TodosActions.Intent,\n                        initialState: new TodoState(),\n                        handlers: { }\n                    }\n                }\n            }\n            ```\n        2. An example of a `StoreConfig` using the static `StoreConfig.create` method\n            ```ts\n            // store/todo/store.ts\n\n            import { Store, StoreConfig } from '@animus-bi/redxs';\n            import * as TodosActions from './actions';\n            import { TodoState } from './state';\n\n            export class TodoStore extends Store<TodoState> {\n                get config() {\n                    return StoreConfig.create(\n                        TodosActions.Intent,\n                        new TodoState(),\n                        { }\n                    );\n                }\n            }\n            ```\n    Some noteworthy points thus far:\n    1. By establishing an `Intent` for our actions, we can prefix all of our action types with it, making our actions more idempotent.\n    2. We can use the imported `Intent` as our state slice name. (Spoiler alert: we're going to do the same thing with our Action types when we wire up some handlers next).\n\n5. Wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Add a `createTodo` handler.\n    - Handlers are not called directly; they are invoked when an Action is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which is the context of the current store state.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        export class TodoStore extends Store<TodoState> {\n            /*...*/\n\n            createTodo(\n                ctx: StateContext<TodoState>,\n                action: TodosActions.CreateTodo\n            ) {\n                const { list, hash } = ctx.getState();\n                list.push(action.payload);\n                hash[action.payload.task] = action.payload;\n                return ctx.patchState({\n                    list,\n                    hash,\n                });\n            }\n        }\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    *** Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler.\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        get config() { \n            return StoreConfig.create(\n                TodosActions.Intent,\n                new TodoState(),\n                { \n                    [TodosActions.CreateTodo.Type]: this.createTodo.bind(this)\n                }\n            );\n        }\n        /*...*/\n    }\n\n    ```\n\n6. Create a selector in your store so that you can access state/slice properties in components and services later on.\n    - Add a `todosList$` selector to your store by using the helper method `createSelector(predicate: (state: TodoState) => any)` on your store's parent.\n        - `createSelector()` will return an rxjs observable\n    ```ts\n    // store/todo/store.ts\n\n    import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n    import * as TodosActions from './actions';\n    import { TodoState } from './state';\n\n    export class TodoStore extends Store<TodoState> {\n        /*...*/\n\n        todosList$ = this.createSelector((state: TodoState) => state.list);\n\n        /*...*/\n    }\n    ```\n\n7. Define a root store that extends `RootStore`\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n    ```\n\n8. Initialize your root `AppRootStore` wherever you feel is appropriate\n    - Do this by calling `init(enableLogging: boolean)`\n    ```js\n    const rootStore = new AppRootStore();\n    rootStore.init();\n    ```\n    - `init()` returns an instance of the root store, so you may call it fluently\n    ```js\n    const rootStore = new AppRootStore().init();\n    ```\n    - You may also export a single root store as a const or default\n    ```js\n    // store/app-root-store.ts\n\n    import { RootStore } from '@animus-bi/redxs';\n    import { TodoStore } from './todo';\n\n    export class AppRootStore extends RootStore {\n        todos = new TodoStore();\n    }\n\n    export const store = new AppRootStore().init();\n    export default store;\n    ```\n\n9. Dispatch Actions from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n\n10. Subscribe to your Store selectors from anywhere\n    ```jsx\n    import { store } from '/store/app-root-store';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        \n        constructor() {\n            this.todoList$ = store.todos.todoList$;\n            this.subscription = new Subscription();\n            this.subscription.add(\n                this.todoList$.subscribe((todosList) => {\n                    this.todos = todosList;\n                })\n            );\n        }\n\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n                {this.todos.map((todo, i) => {   \n                    return (<div>{todo.name}</div>) \n                })}\n            </div>\n        }\n    }\n    ```\n\n\n\n","readmeFilename":"README.md","gitHead":"accc78fdbe922bc6fe8ecf751ec95b536dd9993a","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-b27e0336.4","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-Z+8UIZ++ax0srx52oGJG8Fdb4IGttli0SED/i57C9cN0n+SIj+F7BAZS459PQNkCfRC79hjx4Av2tqHPPj8O0A==","shasum":"23fa7045c419e79329ecdce004717fe4cbd64609","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-b27e0336.4.tgz","fileCount":43,"unpackedSize":231038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8HVQCRA9TVsSAnZWagAAvi0P/RGsvCyk1KoVP0VuU3y7\n9o9T67zvULAo22aTA1c3DMIKHxwY//FiTRGRr/Gk+QayakOsXO/WkXqNzaap\nfMvaH5B9Yp1yt694QQHxeDy5wiQbIU3wlQu+m1OgiX9WFNFMdduRCLwq94rP\nJRtzapcwK+auQfthjhfBPyWT6rkNa1aCgIZ4DAfNhFlni3iBOFQ/iwfscegv\nYzjG8MAWp1pTfgECogjiMsqL6sQnxX/oyZomLVDxLw1qdCYUWbFK+TmyV77M\nogbq2M/fhyT77agsz+4Ei71RiL7Op4TJQZhLgPxJvZZH2qP28tb7VaTqzCQP\nmLeRrUXKnBakGCwnPvx4EXTi+5L6Dm6kCRcNj521VPZhOTvYLbflRhzEFxxv\njGjrMcrfI2HGAXh1+C/vNG1213/cKh0QozWn/vU7qrR66Ib3Epr55/sA0KAh\naxwEBIar4Uo2ODnVOfu5362xN5x8BLKdn1rJunm+J2iMGNhrYHCBXF/yE/50\nkFJMUJJ0gfLQzCB0sFA3Rlhiuss2YK7gN8gGKHLyo2RIdzP3r7YvAK/z3UIw\nLPoqo0js4SvXzDsV0awz3fWXEZ8miwWb6q/cZNQcxrw8CK+tuF39A/Lz0Ywo\n7ZfafWpoHtPDPQKgNn/BPKalFxAtFNfpbieUHRcplLUUvxzdXxNk1K0FUQQR\nSLH3\r\n=OfAs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHmDgjuKR+NxNlpGoX3+MqUjXkSuZHm+Cq2pU//vo8ysAiEAsIRHhKVEUKff8en2yKWWVz+Bj2J7ViTZ+GNayBkZkAc="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-b27e0336.4_1609594191870_0.3798072641371557"},"_hasShrinkwrap":false},"0.0.1-beta.11":{"name":"@animus-bi/redxs","version":"0.0.1-beta.11","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"160cf614c74fb729b02a2fd094fb8c744a1ffa7b","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.11","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-YwK103djeTr+a+ARlOfD/XTrKeA15SpKlKxpXf5yh08bRHvcLxqWl00CngDnlUcKktVvTdZumGxm0FQn+HcY7Q==","shasum":"9b94ec27b7ae4b40f5571bd51ddfdeecb98178d1","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.11.tgz","fileCount":43,"unpackedSize":235539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8LXsCRA9TVsSAnZWagAAzjoP/0u4AcUpfzDGALjQpc6l\nlh5qGOM980QjXtod/ViGl5+5tybRvrTYWjQlIJJfMFivPKxhmxxldVrY5bem\nhjKoAnUdMu320xc4bADOV37hPr6BqdrYIzPlqmoRPmKMc0Yoj/puyrFu3XsB\nfx8YNPBI4eWYlYjSKhPsQbJZNLlFH22ohtFfOkBbYur7Yr5ZuNAfxq1t15QY\nsRg1j67zSc8+4dD3+jQLN7pxlI8ljtYfgexgTs8EdDmivCzNnKTTuc0KwWt3\nWtPDSrLL2+RklM0tFpEwx9dksXPbFuBFVKAf3T9v9Wdpn2VwO5T/xoG1DQOm\n1/s6RRg8ZoXTrtCSge+LCYRYiFlNfROQFvCksZFjp5bxZem8D9cJnSDGlHsM\nBHKwTck/daPa93m+b1FxNiapo90veQg82RPVgolmvZQT48jlv8wuQv7CkM6g\nZQDhCDh+qhr+//yl0/XuQXZEW6OMBHp4rizB5zM7c0u3n3AQOp5OEtn5Pnz8\nRMR+UE1NqV68Xo90FQWKg4m3Oe7Yy1AgD7UQVFszfAxlwVNBz/eJ4xnobpzp\n4w0iyXKBg4wnP640vzLESScPIlL4p4I7hh9f7ZVrbd+qWzkyiL36UPG8eDkW\nnGNJfi2fpRi/cwZ3TiisQeBcJgC3p4xEh5z3omJyaokiqmFG45b+8XYe+ECt\n+oVt\r\n=0V43\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQQCbr9ONiHLuEAl06trBkTT2ynIF5F2v6NetcD7I1tAIgJ+snsQvP2ofICWH1r5DDFR8KZr+1xCZa919LGy7/1CY="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.11_1609610731456_0.13964520709737838"},"_hasShrinkwrap":false},"0.0.1-beta.12":{"name":"@animus-bi/redxs","version":"0.0.1-beta.12","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"ea3d96a7a24bf1e4c22d2ea1370e94c0f66b6944","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.12","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-tEaw3CURlNYt9B4uNzBWc8x3bm+3MV9hZwsiUBc11ZdG0C2GV7IgoxrI1h5e3l/paLdl0B/OxUvq45GE9cbsuQ==","shasum":"3d48fa47a17380cee85588c7155172e34ce8005a","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.12.tgz","fileCount":43,"unpackedSize":235594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8LcFCRA9TVsSAnZWagAAufEP/0BZ/aJ2a/olkDvwrP4k\nikhdJHqjbDRPa7/+G2Ym9gcJkSqap4CkYlkQRxQeFPHD9P+Kl5CSmCXRvX3n\nforOIsMw78L2CwzuDxmqdsF4/9tUD3NEzkYMjpzvVUSPpTFHYvmLp0Irr2sF\ndfW6zzkfVhRXSsEn7aHx4Pwg21HBqJ+ZIw2c5lBCX33/jp1y9TFxxMFxZ7fR\nT7UsioJLqwauwY7EJ3CGKmo2cEaLexLlL0tA10oDDN/nBR2UFP9hlNf2XZYc\nvgfI6rcH/wVMN4l3/PkWNLVpwIBIYs0SZZ6pRXKoaznbn+Rc124XecObnPFj\nG/O7YitX5qPi0QvrIv4epyqZPJxKXD1RTygTcQcVxBoPj56N5lX0BuVKMvj0\nRe34axAwoZGtYaSjmCdOya5YqSlLOjIh83WNgA5QIESyR8/f5l5QEMsOleB6\nu6rASRBP16WYsD9hhQ7zRkMZHKofJ4q3eYxvJQjZar5gDx3o+FdkVbhrqspU\noSipzRYgEMub2u+XGlFq5EGxTIHxVmNwY9V3Ag4aSFtI2qOh1W8T2ZEfv1QS\ncf0CFcQHjkc4uTZYiEzQeAABmcf9xdgu9/UX1YPWJNhyKyCStu7oe2RSKBCa\nTnV7Gnsizrl0GjMjmPTg29ioEjroaempNqFCa4wv0iNES1MhDDAcqVXQ+3AJ\nrywG\r\n=4GtV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE0a7xcXoYw19xO5B+6TCX4oIr9J347TNXELKjJd4o3ZAiAUNWPJhwMLLKkdB9sxTFh6DlOcg+GzseKVnJT1etey7A=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.12_1609611013517_0.12661306632119285"},"_hasShrinkwrap":false},"0.0.1-beta.13":{"name":"@animus-bi/redxs","version":"0.0.1-beta.13","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"288106b1cac11eb5e6ae57a704eff61a1dd0abf3","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.13","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-7PUJ9P0Kwd0iS+O1pgDCV0W1VsfflHQAu3G3ITHiGN70lxiuQVkkjpN2dTm6BLEr4ZchQpPgDx4JgMkgqveoQw==","shasum":"e15389d0128bb5638c8e1448891ccd737d66a6ee","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.13.tgz","fileCount":43,"unpackedSize":236070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8lPLCRA9TVsSAnZWagAAhdUP/RpukNQT/Z5TGNZg3Oxe\naTi1flJc55c8bjQpAlOd/ciz8twwI9lRjUhx+pShoD23AB0wFzqy6NuuNuFg\n6o1UzymBZP7E5oNF9ra9f1UooIi3a3VgMVHiAtOsW+6+c32jhwzxZdacDl0t\nYf42wemVAh/5wmZ3Bxp3GWNrH44G/Y1VzELgFe9G70mXYoT77mEDt2veQija\n2qBGDrTPjkvp7GWKQaJX5kpmFutXtjxZ5Wk84T9NOPwZHIKqj9lx+nt0P9Fe\nMaffuRcZgDd8Us5O4Ee1wUUzybvBKrfnmAsAlQy98Q8jJ0ESYmXL1OM3Zfh6\nxFINb6x6Us3ssZDjpKT5wtU3DN38qz5Blk2iIugJ7bR7QgW6nD4B47IQZgP1\nbBi1Ncc/HAGI/qBH+6iuLEp63opu/tojjeq94pEX4UiDvE0nK80k045q6Lpn\nBxxgzmcFXNDabnRBwBzh/CoAfB5bWWd3yHd9BlXfcrGGHTL0cGiazdrZOpgn\n32ckVO+fc1dXAixAL1lC0/EcyvbRP/cG4YfKkyc5v0DOpEcdNDiSCmlJghMq\noXgJv8yjvomOkiYwElJ279t/3DhWd77N5jxOjCCVl91A+IsAfpt1RH6jI4yM\nPZqcygxKrP40TcTX/6CvFl7waKP8DNHVSJOtL4zj0ni538l3SLdWIGz4uZcT\n0vln\r\n=T5SG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICklphawxknWMNaoHIiFVrJc+RPQkvzKeQKCcqnkSYUGAiEA3Ez8J24pxu2RfNPRqrP2O9l02TZn+hH+wcfGIMW/uAc="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.13_1609716682709_0.08350226804820293"},"_hasShrinkwrap":false},"0.0.1-beta.14":{"name":"@animus-bi/redxs","version":"0.0.1-beta.14","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"b3f791738d9c38d86b2bfc5b3653ccab7d128827","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.14","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-LGbyKseVBfedwa7oJdHBhALOI2ygvFbihcffSJBVqsSs7zNbB28INE8GXXiJ+oskVq+roCC2cW+B9L2LXlbW0g==","shasum":"359f5dacb351e31e37114882a261bc338fe55c2e","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.14.tgz","fileCount":43,"unpackedSize":236925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9x8UCRA9TVsSAnZWagAAJ4IP/jPz73MYr0w2WsIcK2TJ\nUcwEIdvuNurxauz1tFxHgvOvJ/VVdFIElaMi3kpwPVuf347OG2T+w2N4NCN5\ngMJJR3j065iyq6h7Row5PpUJ7oUomxD9IcUP0QBVXQQsFf3wYlEljFdVjHsU\nll0KsvQcSaZIdlh3RT5n7cEP4XifWIwmKScNVuth9NjwzzpYepZj0eJCH/WK\nIYhXPTZ3tLGh4OszXwrl3TDtTmqTKASH+zbs/W1vQrkfP4SXU9UbKNZwgwOy\nex3fcBJTbtQj6PDBt5W7MYY76TAXzFGAQYQtNRVJ+r+58idhdCw5oIrIMifT\nezbcukwl3gZyKM5jvFKtbVpmRE09fwFhwYqGOQROecHQj+GE7rC17/NFRORP\nkoRY7sf754d3v5KIr2mQjRMmtLyZP6zVVmwPupsvMSdGkzap9FmjLx8V94X9\nzTRPgql5OD5/uvv5pDhbje/9iackaJFWSCB74aKb1R8XdeBVKwjh5s/A9XqB\nEZw1YCgnujFPzxaLCUUxqUFhpzehHf9odniRMpUcqnttqJ9dwNh+17ohBt7B\ngX++IVRcSctmTqz/d4aThtQIaf1uQo2W//9UKsIELQQUJBi1/o3AOz0NnBXN\n9TdwF2WzhfLAGOii+Pt/Fb1Aiwnq2918bYD/MB6B3A+CFpJUyc0i3cavjnQl\noBng\r\n=3EJy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEyhl/J4/iSXuaOerCG66Kc/MkRHPk1eB6JIr59TiCxdAiA098Iv6kJcm4Rb3Q47REV86FRlnc2WCmIMmY+PPxCViQ=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.14_1610030867713_0.3278910406110873"},"_hasShrinkwrap":false},"0.0.1-beta.15":{"name":"@animus-bi/redxs","version":"0.0.1-beta.15","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"f136e5e29b79fdfed37783f18154bafe166dd653","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.15","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-1EAmICiI0FTXtPdGfEUL8o3+X/phvTsIK6Bp+E5RYDisq6uKRhSgda+MCxiYS6X/fbClaMYahyz9fTqArdli8g==","shasum":"56e3f8a85db8e8859f34b7d63106afab3ff6a9d0","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.15.tgz","fileCount":43,"unpackedSize":238166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBXIFCRA9TVsSAnZWagAAhkEP/1VnZzDn0J0HyBSHKJhi\n+Lfoz2LiO5O5S9hWGj0c/sHAFPNYIWEA0Iy/+PIG6j0WTzDITI5Yqqldo/6P\nCFYQFPJeO8FpnFGC4irjpVizZluDVImGUfNCsznzpZFSGIuBBorFRxurcUwJ\n5eFRJfVFcU56uTW7yHHPq0fybpkir2g9su2MoanTInJRMjxX5vYFv4XNMqjs\nJEEqBqTGOBFp6p1hH++S9PMncJbkqu6UNL6ws+IScldNNEnb/MebeZUFfU0j\n4mN+qkPHiHbviJ6OYIkevM5bwL/O0/B6O+9k8NRJgGXiF+KL2jeRxAz9qtSq\nG7I9eAZ4VjUKbyRctdJAo1gYR8q7UFtuuOZDmFJEuqa34slb79T3q2VyfMML\n74/PoM8fvYkfqx83zMd54aLZYfrKpv/UfNtmFt6e9W8qs8DSSqjlP2g83yQa\npAWwa1r6MQ8/EK+lJ4aF6W00J7oLzRcKzytCM5wRTk7/zPTTvWuF4CJYJz5n\nRpK08F89ZXCWnvtNPxlV5fDd1EhiE6J1hPKGckD7N9oG28gJX75JKF3S/dLj\nq5FNluo2JCf7qtXo0ezB1A7YEwZEovDF7AmeR48Y0d7Em9f5oeP7RgSq/j4q\nnhhstE3Y5I80/Y8tZhEu0E8w67mX2Y+wwZvC0/Rl9PpwNFsYcxj+M4PT7pVF\nRpVN\r\n=WKTG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3uju/Ogbmnx0jG6v/2Q1jtD9Dguc+U24rSvhvpkewfwIgODi3BVoNu/ggX+QuHG78HD86qccgJdUAhlvvNK660s0="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.15_1610969605287_0.6522205852835288"},"_hasShrinkwrap":false},"0.0.1-beta.16":{"name":"@animus-bi/redxs","version":"0.0.1-beta.16","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"a4b64f45a8f3614443078063ee2beb4040090ffa","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.16","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-ohJfkVzjytEglhND2fBDhrDduSYAj3cRykuy/oM51Oaym35zR2B5QiP92qKlCAH4DJR4bgreQIAp+NcgKj83Gw==","shasum":"e8a7fe0f24660e88fee862357d734c0d11b8c931","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.16.tgz","fileCount":43,"unpackedSize":238166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFKQDCRA9TVsSAnZWagAAa7sP/R96Wv2oiUuQhdpubDsz\nb6OuFEJxTRA3rUAh7mqZcs0L6rmc0yxzcNnzxZWJ3+lOcZ/f2ntbDqxFXln2\ne6fWQZBp4B99GpcLwxHMdQAwCgctGAJz/hNMt3SCabfEsbcX8DkdQls3NdOG\nRI1ZPDSf4AnhoEpnGz6qt2PlfLsHsHRIAo+pLylvqs07hoSC/8q4VPE5GJgC\naNT0jrp+PaSketlTtPd3jQ5dCN7DrhDKsy9eIbgnVsqkbfx8G5w+ucx26U4r\ngCOrzrZeHo01f1EfePDDN5sq2omj75cl5V+scnovzWszgRSbnV/0lqLWRLCS\nCa5tj2lG33W2bdxXMfO01lhs2fBJpVOMz1Zn+vtFnhaQtlzXQpn9CUtkkU0h\nntcye3t/5cNGtmendONchr2LMTXRJDuJUduW9FtK+o4pBr8e1MUPWhdO4FdP\nkGwQInYED+MMltbg4E6xW/RF0zIAIqPEFz89COAzqjJtluDnZuiuEiiaN36U\nBxrPXrHQLLMmLmP3zCaGFQMldfDVO0FyRlBq/xKlNd20TU5tBFo83HhrAn3D\nKq/azB9o/koQ446PFVVgj3QGTlVMGMZ5Hv7ZO0zQjGlYt4L8kJiSjqTv65hn\nMu/94i24wkdG4D8+R8MHIN8QvBP7MS46xoPA2g1zb1hkHOmN5XEp2o1Bof2A\n80D0\r\n=iMOU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9I1cxMKCR+zyUdAiKywxYU/thP1/3dVGBW8Lj6nSXSAiBaAOItxug/DXmr8OvhGSB7vZ0XhtwMpc3HCtVvbC9/2g=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.16_1611965442909_0.9398316352651332"},"_hasShrinkwrap":false},"0.0.1-beta.17":{"name":"@animus-bi/redxs","version":"0.0.1-beta.17","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"3167d394b3fea95be73925c20346b0fa9e5050a2","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.17","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-RZQJA0BJPQoY2b/gNORpPWqBm3dZcb+a4WISCKvRMX+ba2Eor5owlHb22LZzo1gga994zBLGd6Xz6loH/+jWDg==","shasum":"18fb5dc888f077b89459b600c6f97c37c6e52790","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.17.tgz","fileCount":43,"unpackedSize":238480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFW5WCRA9TVsSAnZWagAAJH4QAI0iVKUVXjRjzh0m6w+4\nq0gqsosMm0IytAKbpXM6b5KYYqB/bBpR8NGWYrzcXMKAq/Z0bA0lzL0WyiGI\n2+Zhlyrx2MzLW2OWg7EMtzhZ7SAGqkshm12qQXtjXhJMC7JCFRvOTNrvBI0Y\nYt2Sga1no1lcwYy09TrENEjnRI8pXblnSjfSsOA886/EEzq5DneYnaj9E5R4\nNN3FAHSXMwWW3BVK9uIp9DILvlOAf6MRwxBxBOXlTTz+V0XpcHmmHCFfF8qc\ngtOkHlz++jEseZIoJZhSrXZmeq6OTV5EnArJWHTx/VMJiaU7A0W4ABUxltgU\nJ7+Y5ACsmal0945oojElIOu5LIfMic9uvKAq/VfXX6W/ZM+6eePXmUucWaxa\nW4/FzizCvdMQqGsmQMOsRNOPMCyF+WFuLcHKbemxzhDLnLNVJPz2MIo2Wms0\n2fIowwy7jHkiIPldwvgiD54I/HR9brkOILVWhY5HoM8Shu2AbeHK5fZnDcny\nEHNg1ieByjAlmjKzYdCFGjMWitgROuIObyitJnfbpe+8aj8IYmDIDpT3r5mF\nnvAyRf1vIrO3XAtMBStj1OYVaV738icNWTXPi+K23PVU7Jfnk/iShyhcJhr1\nhYfwKxAEJuBsQunjymQtQS7WPbee1wYgOUokLl9pdi8ZZ+mrRi+OYcChNGBf\n90NE\r\n=I8kB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSzeIR7KdiT67whh+vpRqSD+9sArwYycJPBuLa30Za2gIgaN60U+tjC0cpDRpmkoBffPecuQzc6sPB3o0s3l8Yq6U="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.17_1612017237950_0.8178976075031299"},"_hasShrinkwrap":false},"0.0.1-beta.18":{"name":"@animus-bi/redxs","version":"0.0.1-beta.18","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"a77f74fec197805f3f57728dc328f3b45ec05076","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.18","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-xnGxL1C6CiJeiZm2l0VTJaL8C/Vv3qyNR2kBA1ozEU3QqIvHLgmGjYE/lWytYxJyNNftQgVvtw1GiB39h8Iv2g==","shasum":"9634352be88e081a8d2e150148777ef48f4ee2f1","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.18.tgz","fileCount":43,"unpackedSize":238505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFW+NCRA9TVsSAnZWagAAVYgP/1J64Hs7sFOhS1w+kmQw\nTsQ+f2ipcShHX1SgYkFFbwNLYkMl1EY4mykAB3Ze/r6j+t2GrCkOq3tG1Zd1\nkZFbKmHbPC2SKv8lFDCpZgJx2hy1FlPkM4BgELA8BWqUm2XJK87iUjtXYbA2\nrbEUha5Db85+K58xTuFWyf0cTd2tASADi2pZyehd9ShrgiecbqCcuu4uMCqq\n4XPchLRHpVjsEdnJ7//CNHy++Im4gw4glgPQTOJYplkqEWuzTR7Z7WuggxHY\nztikS9D8MLthamwix94bKu6IfscSutW869+BpSgKYeO/K0xT7yxSTwnYfGqi\n3zW4ysW0bh0uWsgCF3/haaXaR/1RCbDAmYc2PxJ6xUEvNz0755kuaiu7TKrw\nglc+anPtVtEkTVDntnFNt7W4yWe2B63T+nvH1msMg5INtNiuj42NIqFMnwiq\nN36phBZDeCr69y8TsIZ72xX9T22DYL2+KxlyNrd6c9OUxmsliztgZwwX9Q+M\nLWkEJ0G71i8MJHF2Vh+UCnL9+V3h5oFgdbtAdPtjvwUu0TenLEal626a0dBH\nDTEg8/giye+kv4jyP6pRWDJ7IIjVuH14fS8p8wLiUAyWgsh8XlXhK4dUBa01\n1ggP3ehxd0dax2tR5JyKLjIbKhNT5Td78xvUnf2iUP2EN0WPDO85vGOIJpEK\n6iWu\r\n=Zo3h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWkpSJzBOFMeEpcb24E2fziaGM1xfVE+2X6po+sAF5hAiEAmdccuKdOCCxEneuf/NZlbHbSZCjXci53X+QkVbzIpqA="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.18_1612017549356_0.6322878718527638"},"_hasShrinkwrap":false},"0.0.1-beta.19":{"name":"@animus-bi/redxs","version":"0.0.1-beta.19","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"4ea7171542f8831bd57a471fee4eaa42644f4387","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.19","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-e//ct8IZqYO+hxEHiJTYw/PstLMKv3bCg7qPB6fQhysUcY9yT6DfZILU4APMK+1ljsnF1GBUSRrvvO2P1oOsZQ==","shasum":"9f437e61b864f16913cb65f1f32b5bdea07d6a57","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.19.tgz","fileCount":43,"unpackedSize":238589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFXIGCRA9TVsSAnZWagAAXLUP/3vuvfxIxgm4cnZzUPIr\nwyot7IKOcPXtL70/BTUd63pKl7Zytfc8S+X8XEZkiIHvYobT7nMKsKB7Eo+m\nQ2KrKF0HB+jM6KsF3GxO56k+J2V8piHiq5Vu6WsWh1XA/qu3Eo4rmpCrID5A\nmrujIXIh7nHQsRzoX9Db3tbKK08w2sO6tzsp7alvSBD0zVSEKISKA+bqyWpW\ncOYuU6emiJG4+zFCTGt6FXPYGE9SYFqmXE3MH9a+OwFstZY3RC33Dc6KGG91\n8lVFV0924EYTUa7zcgknUQmn3aKU109mW5h7z7ConodzLgdAdzJZ2uTYVoqI\nd0A5a3ANr/fZ0XtHKlGmKnJUJimcpleaKXAgVzJNUfTCHOr434+iqmBJa9iq\nk4se6/FM3ugyPxPqvLthPEEwFfrvuBsdj35SYJRaIw/K0CU1MIdD3EIprzUU\n+2RCGUXtzowBXFoy2uy3wBrxRr11v256L8laYKJBjIFd1p3AUn7AukzKSx25\nchxvstmwXyoaMGRi5YMJz5z6fcZD8GQGRT5dmeRKGHTDTBYdASH4jJqWy7bn\nMYkX1n89r/xApEnUdLs5l/9YseaGoVSQCQFLm5E9W5BFwPkhjIrxR3I/1KIb\nUp6J3MwZj6lblWcKzDH9dY8YaG5jYzGax0ebp60+rxw96uJakmYvHsXVLI48\nw3iE\r\n=ZzyM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDB75r1ahX+pDd9dqAEW1VVOw1BVd/o70Sscmz7SBJQ7gIgEXxDYqfPxyNMP12FOnwpfv1SP29eYLX7uSbKYqTHjcE="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.19_1612018182494_0.2386176018317352"},"_hasShrinkwrap":false},"0.0.1-beta.20":{"name":"@animus-bi/redxs","version":"0.0.1-beta.20","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"a2965d5cc433c80b4835863bf7b7b7b9c6d142e1","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.20","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-nKfuoyhqy+yzhXh4IeT7qLSbknrKs6dhcEAc4c0aoePgAOvSJ1AIxXoZ4SaC53FZDaJNz8PA+18By1XBimMHqA==","shasum":"0660f36df82e7b31b90accc0da61a63d128055aa","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.20.tgz","fileCount":43,"unpackedSize":238640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFXOtCRA9TVsSAnZWagAAC1UP/RFJUz5JT80mI9uvPGcy\nUXftN64F8YvsZbSxbpENQqfiFRm/LhZ8X0kPj6yQISH1lSAcD/IKgEhL2FKu\nsar0EVchJihRmr6Ik7Z3LIngm2BcVjuXRkJbukG2a4IaiaiNyCuQt5FZ4sq8\nj9nK9tJN96ZY6DEMmE4dV6rguXaSdiu5SkT/H9BC8sC3UctP/UtVde9Xav8w\nYLNj2AK2yd5wnpIOV6U0qdUG5wVByG9I2tyy7QzDvHxudC9GNbKJa1HAVd1z\nyoNo74FSauV69VAaJy5/MQ2QiElI6dxEUXBMp8nFqsld2yjc/BrPCRs/crcI\n/rCltUQXAMcp62mbVS5uwZ78QZS7m1AIUJbh9L2osJ433kOX9dFArtp6C58P\nXjQwTY4qRJmPRZYt5BQkUD35TZ3J0tE90xvD1NofpQTXBPUdDv3Bi4QGtYFk\n1Qrpox5d7ahGsb6kG1P97Aql+Xya5a8B80+UFJEsSbJypBXoBZvUZtEflLrU\n21BY0JqypemSQ44MGucEg0bzvUyZ253o5hu0P0RvfH7I/636+zocp5DjdNxm\nz3VJpGWrBURCR1G4gDSJviXu7SsgP+VS1IykJM8SxoHwBhwaiPFidJrn/Dt4\nbfHi4kjslWZmwQrK0gPev0XHeVWP1zFxbIkzzKR2pZzJk/7xKKjHnWreQBEL\nsR8A\r\n=92WR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwftyJYd9dJ5wRegXVQtC0M/uPUE8UiBAU5JLb1y/+/QIgSmUtaik5ZBeD0QsAvfcHwteLtk4pDLlF8ArC7YU4yZU="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.20_1612018604743_0.26326629265019363"},"_hasShrinkwrap":false},"0.0.1-beta.21":{"name":"@animus-bi/redxs","version":"0.0.1-beta.21","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"rxjs":"^6.6.3"},"gitHead":"72e94991d511f0e9210af1e2914e35a5eb8d107e","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.21","_nodeVersion":"12.18.2","_npmVersion":"6.12.0","dist":{"integrity":"sha512-kpMjR3rD+UHvUx0TabcFrsePYBB7KzF8Cjv+h+PtBKiHrLtm3JCMeqKbLe4wD2uThwAdA8mXiV9uo3iIG02SvQ==","shasum":"25c3c8688267140f9cc9d5fb60e52ebdb531a244","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.21.tgz","fileCount":43,"unpackedSize":238652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFXUQCRA9TVsSAnZWagAA//0P/jHSrDEOqEAD6qMHeMFD\n7iFn8LxSDTaU2OCKhg5tol76hIz04g96oXfyrJfJtbHKmC5j+VbeJD7Afr9g\nwKuEjRXSxJigzlOeeHYDP08TudktFthVkA07g6Ok/scq0aY3Cafa9vdzcDDX\nmKZX57keia6umVW8qK/d7j+ZL+LkgbjyaNJHr1w8SloTpqeUA98WYeETDzUL\nAhZGfukYd6A3uFMrehsF41mz4+jRSvfeqdsrqbV5vJ9n70iR+3NPmo93R1Lc\ny3oWOhgFrHN5mtMKpNCRr8DtojaeTb6YXUQ9iuz9PBmo7TLLo4TGWBowZpZx\n78vUDlNSGAjo/KKm5B4XhCnB3fDHNp5d4Z8Ixc/KQQQHGvz/ENs4tmBlhQH9\nO622eG+4BPn9iaRbWS60gVHphZJzh5UNzLF7dYgktHuKr3T1jBhcpAQInwlG\nAeTQl8ux3KNLPG7ll1Jdp3WAXYzc4DcwuGRb3xVHnQIeYaiUhdBQ0qGgzeXY\n7Tzss2T3Gt0WgbkOh0d83mGOqNP+kL/B01YGcy4I5AGjmi62vMxCcUS80Af/\nXm4y00Gd6cGSOQPZWj1KUQp1GdG46AVSdDoW9uK8UaOHVukbdlzIeT/V9hbm\nalGCwVlWuvxSrAbhAil11hwS184XdXRBYIC7mFqi2X/6DjNNXqBEwGbKDwgK\n4K/q\r\n=a+o6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCK42+i9elYGOPy5AauFExccQrlzG/zOU62ZEgdHl/X3QIgN8lA/Wyh2UVmgRxqRSICnzUESTc0lD6oln78LaGIW7M="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.21_1612018960395_0.576249292669528"},"_hasShrinkwrap":false},"0.0.1-beta.22":{"name":"@animus-bi/redxs","version":"0.0.1-beta.22","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/lodash.isequal":"^4.5.5","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"gitHead":"d2f7f0fb5b94557012b1181e4ff28c24d857869f","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.22","_nodeVersion":"12.18.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-vpEkZCyUMeG1jTTO/3jAQrdSTBsZbcvH5D4y0j46sSG22ecnIuGWxP1fCUU1HkLzQj6dZWMWe3agYcKegaIvuw==","shasum":"62b723c2e3ca462436084f431f330b3029fcb5da","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.22.tgz","fileCount":43,"unpackedSize":238706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHfCaCRA9TVsSAnZWagAAfTMP/02TlAGQaSZIyNj4Jy45\nw/UJTe+ZZKcsG3OMCNqx4nFSE3+K31MMyw5p6qibHUJcvCKqxXikXzUioOuL\nafj3PN6o8JBY+E90avK7eNHWqWKVWovyCUeuHPE7kNMSG2U6w8dgYhF4S/Th\nqcmubGuXoTjbZJpO9nnfcam/UPcftk1Hi+nQACDC3bNWvP4uRQrfgd/45KTw\nuoJZKdbhtl57aQyoU0++1GeT/IQD3yNTZnSUW68CxKzbGSm7wIF7EV8IeHBD\nnMlM5+PYyGks5cOQGRQThf7LUO8zmMdCBbP+08YhPzDodIwz32HeF4H4YenC\nG8ax7fIFpj05fSclkAobqmQrVhtF95MWc4VPFEVS7r0juMshXFTPvbifq12X\n1KkuB5e2wEmTAA7oYss8rShlfWzq+V0YV4V1fu2Mx2maRb1GtAHOlHdSSWy8\naSSo93IocycgqMR4PmWUDk8Sgdxl1rf630Q1hDJKnzjrVNT0R1pOHqUGnNqE\nrl1A3u6sUdI3Xy2WoKWnFn+B8RrVMlypNiuAq8aMF69xvN1CanUD47MZmdRt\nlygGjFLFJ+tsbS7ObclUsVRq1ZMnjV81PllcsXMd3S9oP7Ipr+XzmBS83OJ2\nYpS7ap/v5Q7Dd6yeT2FEjSmmPZ+ls95DH3ZC/VOyDtDHCLmQBMX/A9H6czNl\nU5c2\r\n=uVUz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDM94HDX8Lkvx0RPk89AHmbh8rg3L7osIldBREdH6qhVwIgUJ32w5m1zbWUC6zRAZN2iUZfE2c9xAcC1dz00ug838w="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.22_1612574874180_0.5195022135913308"},"_hasShrinkwrap":false},"0.0.1-6c28ce2c.1":{"name":"@animus-bi/redxs","version":"0.0.1-6c28ce2c.1","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"6c0217fec207566b08cfdcd27872d53ce13be710","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-6c28ce2c.1","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-/FcmzqTYJffbN9iRBr8mawdeLTH1+gkbbsAIczwwmQTyA4omQ7M0CelfYQs/5zkTCuNwP6+pXBeElY7c0dSFTA==","shasum":"0b12d471968d58028867871d40cfca5e60961f61","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-6c28ce2c.1.tgz","fileCount":3,"unpackedSize":17311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgluemCRA9TVsSAnZWagAA2EUQAKKUdpXow2JtYN75X/D+\nZMGx9wpyCIXeC6AgegcIYrSK80euN7/8x5tSuDhdLh5QGUPNPWo/CXNaRyIk\nxuRmyYG2/PAwmv6XIQWkIdIvRobLYCeQdTBLn2O9qWmmGpdGRpqYngcelfQK\nMhHe+/NRBRYh5sZg5flxHxDRAc0IB2PYZ6L5utBzZR1QtUV9Z1FGEMfU+AJJ\nj13hIZkI5Y65PPcB4ccIMjfLLoBc2ZJtKoPXgL1Op/7zgA4+ByYW6ISV35Lk\nLhcwzsVF+O2e3kAA+LrcZbQbnZIDP3ndqCj9XYEFS1wcEqTdsNKROHMSNF5/\n6+yZdORCKUGyDbcsBPPxE1wubJAs4hUOm94p5vy9JxBX/kwvzuCfkSHzFXQO\n8bgYTVnYoRLBtAq1yWmZJpdK8TxbrSOhfYb6Y5PcAVvJq22VmM715gVNCNri\nfnIb9B2Hhc2PM3Wj+mwLhblIcI7ZWJu7Bk8P7J+2jou+uA6zVXj1Ux8DOxuu\n16TvLZExch4iMn+hXgp6bubfwaQROthckBgYPC+3FP9aO+wzaLYNHuovMqv4\nxxsSmUVtz1hD7D63ejiY4gs9IriXw0xNUCGJenoCk8qK0JvMY0FsRH974qi8\nGRmGz/cv7IYn0rt77D1HrlbJH4QfAeQsevlDlYkR99/lfZBvujO++OcTFJBI\ntBVl\r\n=AQXo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWHV7wuAxBjxE7l6NfSMc4PqarKuOvDHiKrMJHvIr34wIgJ92cN6IyHZKX0o26j76X5q2Jip2Em4Pjrv9mjqxrOnA="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-6c28ce2c.1_1620502437767_0.28112245699420635"},"_hasShrinkwrap":false},"0.0.1-6c28ce2c.2":{"name":"@animus-bi/redxs","version":"0.0.1-6c28ce2c.2","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"978b359bba51912e7c83b4d21d3bde60d5b6f6fe","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-6c28ce2c.2","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-HDubyy0FPsVza1mJ6FZN24WCImIrlT8hVJwEYU/pPOxM9mwPx4bKKsAQ+HT3iSoZOnAqwAbALE/LdOwNOXo3dQ==","shasum":"2e6664665e222ac9b416f9acc764651afd0a3087","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-6c28ce2c.2.tgz","fileCount":3,"unpackedSize":17311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgluk/CRA9TVsSAnZWagAAntMP/ReNUeJLwuYlIShiPrsP\ndds0fFXqQn2p9D9zmWQna6lZ1vo/xe1ovBpR/a9QrCco1TsAvs/YeYwymqD2\nFklYcB/p1zgOe1mA7tOJEYeKwW7npEEIwA0ZVS8M6b1nKB0UC/X66OSqjsc5\nNBOfT2PAlgS2jpbkh+ZkbnDE56eEw5HU8QnKa3/LpJu2Qhjr2CYJFg/vOoQP\nzKX3UlW9eO4bsu2zLbaj8skfYtliG6CWFQfluryc6iUKdE3MmOUKgXCqa/gm\nC5sUVkTrakFpMbHG0WNiJzWRxbrRGJE1t0YSNE5ksPUX7ChNoKuN+qtCKPYH\nths59Bh6jn5G+DakTGtOO4HrFoy+S5oGpb92p4+y7J/iUmjlnCi+nP0Bvn59\nbypIVSO6P3zC8hEZ4VJQtYPDgIiQJjjqBcipogSVjoTcx70galdjMqfIbMil\ny65lDu2p0w6sAz4HdWEmD7UYyM2pD4B5pyYCIu0JfCY1JA+drcUjr+qbxh0y\nZKi6VNqTgfXWr7ZgiZp6Hh6kp5z4u9cQOrr4H5Nd/plQx+AHdrF6bIU4Ez+a\nXWAjrTq7y4VwWz+TRwuO64E14ETJ809ItXHbTeONKxgcChuGWu+M7C73eWaf\nWn+VveClWmPFXNk6tXZvM5MV0+Aglt0EdRwGqNv7HOKh9lvDPx9WGjKMmWpx\ncfyN\r\n=jjEZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHAT4T956ARefPTqg0+s+/R+PVXPUTP8x2jVnhe0VjXoAiAHzs9aoFFynTIrjGa+bflFXRmNXr1BLrTuRX0O4FxM5Q=="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-6c28ce2c.2_1620502846602_0.14306714650805086"},"_hasShrinkwrap":false},"0.0.1-6c28ce2c.3":{"name":"@animus-bi/redxs","version":"0.0.1-6c28ce2c.3","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"bd68717804073f3ec28c6141ab13dc55edbb3009","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-6c28ce2c.3","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-joRy4MNH+S3oPo8zDkzMA/5JlsW8ZU91ccaW4Z4CfUK958Pmb9yM9z3YQH6ZeoLzi5t4VwDmqi01pTvziLQrPA==","shasum":"327d0b6533aac5a865a6d6a2b0fefc1b9cf2a077","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-6c28ce2c.3.tgz","fileCount":52,"unpackedSize":246678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgluuUCRA9TVsSAnZWagAAJesP/0LtE7GgICOpPXmgSSMW\nnTZLY54/76IpZxPL5YoXYl8TfHOPmhCP1x+wqd68RYZhCEwRq7Lw2MUo9XQJ\nvcF7TSHwe8QNtGLtiagknIPuCA0ASRqv6wmxLWCrRjTuSCcPqCtQGulXIuEp\nm+SLopM+UBa1EaZZq/ihmihS5Yu+UrzIpSmLRXsGdaC7OZ7wG0Tgw3QAuA0q\nN1zYYdyzAuKqDU06HzTsjfr8vYqysB/GnCDWCfnRsKbX7sPmycr5isivcQwA\nl8J+M7PGbKKvQwyoiEOI3fXFg9UFnLWDrKu0E2R5dwIooQcYQyYJM3xWoX8I\njt+gOuNWCbg2VBbYzUpVHWvHt4d+5anv5VMcdMX8pSgCFWJKfTdq/6BKE1vW\nNzR1dLoHRroNxnmb//Mx3Rf0olwFDzweAEGKcBs+44uqS6ueHFoYBLJ0cr+V\nXhsjG+ReGbda84acWKNedbrkTe3f1CmvvcgXZ8nv0MKnHHtNKcy2fo8Q1vzT\nQl7WBBFsJXg8fC/7GH2ACsCaCbOGUZvlgQyX1Cpsrq0b8nGPRdOHNtTlqvt+\nHz4Wj2v4d2Ny7tRBvcrgXAK5lroutsEbp/V1BLMjMfjOpg/o7AcLpC9dpo0g\nvQlC792XMB2DNTFscK8drh2pYJt8saAb4yONpeZc8CrjTNZCORL8ulvCm7t0\nhDYe\r\n=toTQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICPQRD5oue9napEVPORtraLtlzSNmMFoJ9aFpVYL+HhCAiEA0vt+NUkRzqI413wY/PYveejc00+qRDNhABjcO4N2St4="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-6c28ce2c.3_1620503443808_0.4290663606331222"},"_hasShrinkwrap":false},"0.0.1-6c28ce2c.4":{"name":"@animus-bi/redxs","version":"0.0.1-6c28ce2c.4","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"gitHead":"0aa26beea667bca7e104c80072be500ab752bfcd","readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-6c28ce2c.4","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-H6BjASRnXfmaGX8hBMGsNCXNXdUNSsdH8Bez6XaFnVhXC0HHyl+CWrVZ+Ce3KNSZ8dIZ5yCjL47pE9MfcCXpjg==","shasum":"7d028bda4a4a45415694179d410bbc7b29c1b602","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-6c28ce2c.4.tgz","fileCount":52,"unpackedSize":246318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglxM1CRA9TVsSAnZWagAAF80P/2A0whFPR3f7s5QUJa3A\n7F36RI6SKBhJX3UMEuGS4S6PYK88zHmWMczorEGCG8p5rFnuxRQhcZYVNJW1\nXgUQzY58D2b3e8Mel7lvu7wV4suagtS5vsN5enL2IOgipG+U2+WFb1JJ8i1K\nVrgxq55XbrXxOnEUOW0HZbs8Zhv/sUHSr7m8KTPJLJ78BYG53hNONLIiGaYx\nVPIDEeCrz29OIpzKvr8SdCFdNwpE5Hoh/KQ3/0DZgLkBNcf41AwkVItgSsql\n1/85+SjLvwtygjbJQnWpSelbQPW4J6SAy1B9VqvQfG96Dq+qqW4t28GlYBpt\nTwpA9mQZ6PDdBlNgH8kwk4bTdZxuqfES+cAGJO+fKffA7aS7wZkoTuNnrT8Q\no5U6dQsswY3HLlipgcPsexr5oVR8u1qXi0PSzYE+C94gOI2slDGV1tTgRVW0\n/BuIb/YY3RY84b82xAiVNy4zwG9C4DlOLQm/946TVZKMtAMS25C2SKe0i3OF\nCo+/cabT4ce4PQIlv/HpNzwQ/1ULc9acPkYROowm1KK1hIlWTZnh9MtZ4sVy\nZNU2raYwlsaxY8hQiM6hUmj8J6ImYCmHdaK5Bz/4iuNDovy8nfymhwU/4zk2\npZ6+cAXNgHy43eN+WBFNVspeAWBoM+Ubu8KHo3uDKVRd0WhI542VtC6FBIuM\nuy/5\r\n=E52o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDls5X6e1nIK2Ug+AVIUeO6QNOz0WoDZizuUf6peueTmAIgeA0xfa7tLfhXog9xYTXkman05U/a3rEcJH6VNfpdfMs="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-6c28ce2c.4_1620513588474_0.5234895018234251"},"_hasShrinkwrap":false},"0.0.1-beta.24":{"name":"@animus-bi/redxs","version":"0.0.1-beta.24","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"0e684c5bafa4de76f0a089341ee8c5f9126e80e9","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.24","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-mmkZkrjWmmOlrafjYniu0qt7s27LDDjOcdCGWg7Nq2kjwzwZjPxVUXW1OBoNvn2eAYuCDbB7nWFNhPQGeFs1Eg==","shasum":"34f285dfa8a566104e1c76308da78f18b0dbd677","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.24.tgz","fileCount":52,"unpackedSize":246315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglyJ6CRA9TVsSAnZWagAAI10P/2SugLAMnhTtNlXkwD0Y\nJp77JDmRcDV8/1g2oR2CagzCHzTX0NCKyPGPZaJPcH1LFxHEeyARk/RH+uMI\nypSLyCuocACy4b4dxZn1GTb7HzoakuEW6apTCQt+kYhp6uSIP7wAMVNSYv0+\n5yGOwElmiTRdyAP8RvBDSlKkaVBmCltsUMFAv8N1CoLHql+ZFrPB9oBLvK2N\nbUmJZHu08+IvljizC4PGsJHCqabh3dTUVUxGQP+kevSmKWWdAEzYNgDbpjbT\nPkYi1DR5TtSfOhxbbPkEWwKwy9WRiFYWuQ28yx4rHvCodeZA+79tKTXWDvi6\n1LsAdCouXwC49rn6dVsmynVyH+AD3IMoPXFldUHdYdGEbHQhMbn2e0H8QIrD\njNTS8fOt6flYqjOCH1uFFBAsIkTlgy2KBcuBxHJ2kMu5OXZ2X5ucSbbDq64N\nyMOa58aPQ2elkIb/EOX1IA79Y6vLTr1GKz7wqQhoWTZKidqL4AI6lhwLzwpf\npfUpqmvOylC0XjwlMp6+2sGLGRKJzSH5ZiGFLOY5EGWh7H8sH+Y5C4/I+I78\nqsvL7VnaL3rm8VjGFxOpkm1j/rv1agYSO1IpIgNhq2xS6BmYn37xeE+2DBd6\nNFmFldEWnTwaqOLMRMAiRQyy7PsLdVIohNTVbLOiexbrLMaiNi0qU0EqIHwI\npe9V\r\n=yMyu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCURXWZWHa3jehJhyZrY/uSa0aqAjGj/+IFFi56h+gY8QIgCgNDQZTThb8C9lRonKWzuM9DENCT+8RLJOE+YxQHzMw="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.24_1620517497426_0.42628598574663723"},"_hasShrinkwrap":false},"0.0.1-beta.25":{"name":"@animus-bi/redxs","version":"0.0.1-beta.25","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"d5b1dfffb98a3e9e246e74d6a23e539b61475a9b","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.25","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-4cZnyrhyaNZooV1M/qifM2vDry2/RgaYXA4kosyopvTOJNffIfrcDx7nHA4QxJp27TnVctiSfRWGVLLVLJC4SA==","shasum":"ae00510def367a9d68a8a030a4b15ee8f84a1eaf","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.25.tgz","fileCount":52,"unpackedSize":246315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmBHYCRA9TVsSAnZWagAA3e4P/iuZKtR2hfuZecNSUweb\n+olRuDzY4Iv4/SDVH5VSe5rB4gcMFqEJX2HVVDb6dyp+ZxYrMVOLBp1Hh2JY\nR1ib4R2o7MAbtfdN6BTjUeTwQOxQDQXkk69orXJVPuK3Zl8cHc03Pc+ZOUZP\nWyAuhSN3VKFuvYtuGb3fAd9XLYmKSm/uCxT4J+8XgaKzyGMYIzoUhZBsoAcf\n6ZlMKqyI5iP84G+qQkF4iuRlOOcbjzPUJI55jx4q1pWk6DJFBYeJghGZr0Fx\n31ne2nDhyn7sM8828GLcvwB5NaE6m6Y4IzEVW0zqWNR8nFhN/arJ5CaKzioR\n/FiHopRp9jrtJveFng05urOwng8/HXT92KkdLKamJTLzCZX+vFRTBnpEujt1\n+/6syu1yb893ljIctte5Il2u1pJ02eVBSNr2KDkN1H/Zpu0OHBSlww6GR8YH\nEJ6MMi/BYf+a5lkcd8/BKSrl74cSRNhfQJgvKqD0/p6EtUjW/VEfCMJCD1RJ\nFFLe+YbUtxzCOFXMVbNwiKYfUpoKUVi0AgsNXUwBF+6wABevx1cdcn0WveLN\nV3emvLUaav8VkbWviKK9hhnApC1G0+kQUEMHFgNavoJLEcvyMuphRmkIw9Rl\nxCP21rfu0hVobiRlpoi0xJnt6cv2+2GBvKXtoOf9GL38D/TWuKmqClE4H1kE\nOPSw\r\n=o8QM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDm3pwReHUbusDNxCaqzPi+Bgv1/xXGRA28GFi2PESNjwIhAL5wffe+NMNV2rnEn8Jh7LJnRMl3mqfsRN4nf+5+edUJ"}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.25_1620578775942_0.7968963557955"},"_hasShrinkwrap":false},"0.0.1-beta.26":{"name":"@animus-bi/redxs","version":"0.0.1-beta.26","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"d5b1dfffb98a3e9e246e74d6a23e539b61475a9b","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.26","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-ldEnr7bWhM1CrMudNgRYJ9VMjE/4kbRDxrvJhN4maVTnO8iO3ZCnJ5HU63bvelFqVZZWE/TXYovn/oKhHYXf4w==","shasum":"fd8494ce427ccc801d98b0487b37c7fbd02c0d0f","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.26.tgz","fileCount":52,"unpackedSize":246335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmBH7CRA9TVsSAnZWagAABxgP/2n7jV4ffQVkUCUJs1o/\n78Szhu93wPUR6sRFFInUi6P/Siqg2IUsGNtBK/xX8sry0i05hnbf4rB+9zKS\nZGP60vTDkGs6mwxXmrl70Q58yEOSZCtH+0GUiqpW3fNbXsCYXRaS5sAEryZK\nx2nn4Qirdz3emY8Bb8jz1Qq6p3BU84YvoX9i9wHp00RaxVD/Fio7LHjQBKe/\nZzydrf83B9mptqqlE6GdXWMGB8rw3qso2SJ5icWZSrIgXpNkMpjgMO1WVYjR\nwQALbRDywrIScRuUvyhAUmHL9+/Ud/USoHcO+Sn07L4KWlbUCsMw8+Rj9KvT\nw157RhrnLLBuL0unPqS2AO2iMYG/ppVYA0DFBTxjcUPPbpmMeJYt23oMmbew\nX6QLh7ODgvboeblREnrl5ZI3fADWwqGVXaYqE+iREWvkrNGto8w6g/I+7Van\nmfmGw9djRzijNn+s3+fExSkc/pVcsYDzfOpq+pEIdGRuoFJDjBug9JkEba0h\n4XyPZD+aoGXyyCKDm0FkJK0EblQAYpU1TGwAZR/meiUDdaEdI/r2wJ82IFi1\nXurDM7WXoi59/cGGkw29APVo0g2ZeMycRu6zLlKpyBvaWDSOhWuxQPPz4qU0\n0bmj6hl7L/mmIQ5bFL3+0q4+N3ODZ4S9F+NSrImaRpgjUqgI5/PAuJWAvdil\nxGm9\r\n=b/Kn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeuDRgstZzhbembboc1/S1lHkEjZofDjqdt0SZX3QAnAiEA9/fRmfTA53c72A0xrm0ZBGzv4f+eKdI1ddNrn3sIbBY="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.26_1620578810984_0.30249707693009165"},"_hasShrinkwrap":false},"0.0.1-2573bc61.0":{"name":"@animus-bi/redxs","version":"0.0.1-2573bc61.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"5f8affa481fa07714445cd55b607fef59eae6680","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-2573bc61.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-wvWE0h1Mt4xlg0/KfCmZQQaBE3WBa1Fl73Fn1iqz2S98770F491vq+VmL2tTkw0KD1aETpM+2fono6uocsZTKw==","shasum":"df8be85a793a265e17bc8d025d83b83530f3cc93","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-2573bc61.0.tgz","fileCount":52,"unpackedSize":246338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsDGCCRA9TVsSAnZWagAAmS0QAKHWoVru3l4bVqJA0Uzn\ngpFUIWzoj7+AqgHXj9LDC8iE1MnzxYA1npxuil/UWQShD3nkI869SWsHQogD\nB800hVSJPwnGwTnWl3cUHgaE184BiR0UvlTWgkTiZvcLbLcUS4NLPEqY5edR\ngGs+8OWGT6xNg/BDrXTQ61yCwYu0y2i5MqVprL0czbnMA4tNKsC0QmA2nSMn\nzozEy175iMBZPl4GzPsJdFZKh9J4ODOBRt3wrWaf/LjEc963CRpyG3W3FlHo\n7I+jLP7HImfQjRSq/IhhMspFxE5BYHQqETcmmzFcNxpWXIObYWXQVajWOOBi\nbPXR7zbjgJCAYzFfM+lTM8X+Wm7+xQrnZk9PCdCQQWwmagONepwXI7FjECQr\n1dZCJUl1pPsFQCgaqhJKg1as/aTLX3QIewY7KhTzqRRLJLIlrkJeiuw1LFOD\naNLds7HUZ+lko7o6JaAX+CGlsL4p+oVNazglubg+bmXTnHD9cr2Bg7DvKeYA\n66UiBtdJCVmD9IhqKm/rzSeWn0onXbby9HZDtlVeET8Dm80p2Up4Sn44ZUKB\n78UP9WJWXFlOS+r89RGwmHka85jcU7xGOnKS7YX5PP1qj3B8ZOpIvdH7IMt7\nIBThIfSlrw+g2VmdjQP2hdBMJVYCAaeQVru+4YdEPleYyiVsUEtVKPu49GdB\nOXMY\r\n=g328\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoZyQtK/fccX67IWAskZ79PMb5v5FKYNu6LmvtWThfRQIgez5t9kgW/T1tg0iW8vHcMyoULeIYX3W3YbuS+6KO4kE="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-2573bc61.0_1622159745735_0.9708632145602243"},"_hasShrinkwrap":false},"0.0.1-cce6464f.0":{"name":"@animus-bi/redxs","version":"0.0.1-cce6464f.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","build":"tsc --listFiles","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"ebf5252ba58b4fee111c6a5e4fa1cb46e2b3db2d","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-cce6464f.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-kSt9Bf0Zb7PkF3cKxRGZ2IndKc3Z2cbVtKavJnpoGplsB5jBkIkPk09KMiAEdJcei5CUK1hgq/W6SJELgw2m2Q==","shasum":"4e786f838af4cbdcaf2dcbf2e4fbca6030e9a21a","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-cce6464f.0.tgz","fileCount":52,"unpackedSize":246338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtuUbCRA9TVsSAnZWagAATh4P/2PtMmffGzyt7jhEOeon\nPz/6Z1uqY+ktI2Zy+to6kIo8mNWNYwM0YN0pqX5PiKQ5pQ2H/XN0HShY5s7W\nZYng+pQ8SpEKeRGzuZUSNVKzf00AlGWHSdsloF4aGCjPRSm/A769m6VEpmzB\nSnpS/CB/1BRAwMZffRzkTqoLORPA9EXF1RDxomzNTLUdpD1MVd7RI1LnP5t5\nRTMza1p1VyYaUvY2gG/bWxeumoTe175dA7lpFcW6a16zwfwT6u5SA5y2O5m9\npBmJqJusAzwrQLXRQYVgkPvP4zTgrQL1V2Vbvvx2RAosjZnmul2nI8Cihw1N\nNmjx5DYjl7MwVRU+oo4D/sDBJHhIXd7OitlQyIesd7D4H2ghD7BwNFvss5Lv\ng3mM/eyAuGpKaSq+AbYHbZifOf65Fi5fm4yTJUcUa6QaIgjKkUYNK6mZ823U\nBlnW8Wth6/linc3B2/lg2b5gKstnpsuIFSnfBqkVB2xtj6graLwWZzhv2lMX\nsAqIRvkenJXQiW1ChU9INGO9W9vKzGUXTVyA0GS0iBfowsVlG+uJzpu0H5y/\njih5+MksuBoypKs3vwVmobYapunhaY0rgu+VoDyeWDo1Vj94qX0XsazIkjNu\n7n+fJteIwMh+3MfHp5Zmg/ah7eY0Q1eLjPJWqZVJ7ALXQwlDtFpqEv6/Obt9\nY4DE\r\n=A41T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBALGXvG8fq1aDZf1sDz98wN4sjYCKQNYXLs9skdl2XTAiEAozzoZR/PE3bvy9EV3aTDD1U+OZhhSupvZXuD8WfLlNI="}]},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-cce6464f.0_1622598939361_0.7959498161943444"},"_hasShrinkwrap":false},"0.0.1-5f8affa4.0":{"name":"@animus-bi/redxs","version":"0.0.1-5f8affa4.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","minify":"jsmin -o dist/index.min.js dist/index.js","build":"tsc --listFiles && npm run minify","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","jsmin":"^1.0.1","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"87a878c0295021a87501db23dff2ee3cd8f83c09","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-5f8affa4.0","_nodeVersion":"14.19.1","_npmVersion":"8.3.1","dist":{"integrity":"sha512-a0/uLH1+Db4d2QbLvcA5MQM/rfrIvf7wlXQp9qxeGScYv3HHpQs2h2Bsx3derh+KnevXAAU+k5Q7J/dKuO9zdQ==","shasum":"4773dd643e3eeed539111ae371f10b2e4ef58169","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-5f8affa4.0.tgz","fileCount":9,"unpackedSize":88415,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSFAx04p6oodGh8ryBSVleK7fdYZLvtFBObIq6hm4W1AiEAiII2dU/tq7o3dq+2j9uK8BnHsbN2BX3dr2t7/lFZbL4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibHzAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoX5BAAomjTPG1NsAlHBMF1MMy9fPqp1aIHQ6rEQWzvCo+PQN62s+Xg\r\nn0J+T3bdUTwDthOhuMPMNco5AYX6gVqU9U8sSI25Yo1ZZWMEGaG7ztZ6fmni\r\n6Vpu6l5yvza9EY5+CPMMUE9WtSPhSiPBNQ8gq5YsVrs/lr88EIj0cvPWSwEO\r\nTrunoz1Stuxfvv7mSgW1IoIZESTkM8309vuSVbgLz6x4E4BCOt0IG3mFkBNp\r\nfCWeuvedxs9qYzuhYzNlShcVoC4tiOFUto9kxOvGmsQpxct+3t134esIbQn5\r\nbMXH/AcGi1PBdJqoG4FC6C2U+dWz/BBjZxhQqUe9djQ+6P9kAli37p03VCiR\r\nWNvPH2LqHODdqkIISA47p668lKIAdyTivbO+s3hLwCsSK4lupuJtxD0IcAFW\r\n173kzR3KYYuLrbPypVn8MkTiRfy94cX046ZlbEoKsKIto13A8QUgfrQdGM7Z\r\nmI84MfBoTMRUxAEGhaaSzuCIlDeiVoWn4Dp+F/gGEpFldJpyPeprx/z2V43A\r\nZ86ra6YYnzSA/RuclGHOT7B0G0LDt3fdBCOaVYTit8yT5JEmJikIgAh48Rm2\r\ng+mTPNBgGg4h1ccIw2tz6SJFCh0Tv6o028d5ho8goRlD3SQT3Q0ouVCb3Two\r\nv+GoUxjvpFOzgQEPWwkzQpIdwZtXOeGeNiY=\r\n=NkHF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-5f8affa4.0_1651276992305_0.19266692287052978"},"_hasShrinkwrap":false},"0.0.1-beta.28":{"name":"@animus-bi/redxs","version":"0.0.1-beta.28","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","minify":"jsmin -o dist/index.min.js dist/index.js","build":"tsc --listFiles && npm run minify","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","jsmin":"^1.0.1","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## BETA\n- Be advised - this package is still in beta.\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","gitHead":"0338b8e397aeed42eb20c21d86cc2a8add37283e","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@0.0.1-beta.28","_nodeVersion":"14.19.1","_npmVersion":"8.3.1","dist":{"integrity":"sha512-2kfVZhwP3yN5oQ8zIRSOKLZOxSh7Uvy+DBw7/mRoyF44xbHeQCj2I1/66bPPUiNd1bDfSo5usRvT1eoE2WPGTg==","shasum":"270f0e714650458ddecd01fb63a62ba9a2e3a2cf","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-0.0.1-beta.28.tgz","fileCount":9,"unpackedSize":88412,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDaPc01RT03zc1It0IeBD+Xrk1tdy3n96+l6+7joHfyRAiEAtlqYBfke2fmJmNOtCt2UfcrkBOvpFRsZhK9Lp5mbQ+w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibH5fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmozoQ//WcNdiaqOVfo98h9j6kITh7y66pa5ECXuQlGxLlzDTFxegkPM\r\nuSWYxvs7gNQ3iWM3ywzFM1+ezalyr3gQZ2WJjBGSWxoYNP2+mT05qPyPEExa\r\nI8tj7f3AHraMe4+vRDOQWTy/66cIfeuYzAaUjz5wUlqibbBoSXg2oZZCxpqE\r\nFKvQkTtgAwaaC05wd3yrDY9OVALnyq+x7N3jGd1t1D1SRU4uSLOy0I/UX8qa\r\nH5YJVE8wixrMKngfPdQxs1KqBXc5ZLt5FxNKimS6x+SM21N+Wg3llScQu2kQ\r\nkMuW0YW5Ol/bUG7vurWgxKFFIJTklhXRLzyuJ5/gn/Td8tYJNG8cDfhSHk2w\r\n+HYNSJX7qucXSudymF2SyFQ9mnZ0xqHPBp//nCTNWihSRRpiSSxchO1wt7FB\r\n0jTNXKS0l/0M4n4Ok/+aOblW4V1ZYfXnQID3l4TCstVLWluoktxqwQ2N8uFL\r\nyM9/4rLd7MMiHGHAM1yxXAmPGSw/hODIvwMGuM1is2gXqxKy/PIDPIlmLlqJ\r\n/khNS0CtelUdQyTxcic41mwrbCATazbCMRvxCImT/MhZqv66yubMIKGLpo3i\r\nNBSDKnkIvr06YSpAH9XRQzsJf2yXDMn3SpbpNotsNW5YRY1508hHSwJdZGPg\r\nqdkcAXNlFdAifA8VesvQA5lOVWXZFuEJJ2k=\r\n=ATOV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_0.0.1-beta.28_1651277407159_0.8056734970020234"},"_hasShrinkwrap":false},"1.0.0":{"name":"@animus-bi/redxs","version":"1.0.0","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","minify":"jsmin -o dist/index.min.js dist/index.js","build":"tsc --listFiles && npm run minify","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","jsmin":"^1.0.1","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"gitHead":"b5701dcc86e34d1767a70d47f5a22877a4895540","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@1.0.0","_nodeVersion":"14.19.1","_npmVersion":"8.3.1","dist":{"integrity":"sha512-KWqyTiKeMy0EajsKvr3XtVbqEK6cX5r168CvwEDu9TLFlw7bdqoY9xHVQV96PE48uZbiAEkx1hW8KxsqFXjnAg==","shasum":"c6fd7e59878c7e9a9141d7987db2c1ca034deaaa","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-1.0.0.tgz","fileCount":9,"unpackedSize":88404,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGBi5o0F2GkU4uumzjsCf21+PBaQ6C+WUIpLWjC/fcN8AiEAzi6atup8e4Msp8PRQRP/voaFTey1Z3pH+Jc05WvFWrs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibJgzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrI3g/+Lu2ILdm2Ml73F56+3GGmGORhSzyzpMAOHwR6MqOHsjLJLq4h\r\nZFtgB+/L6uQSSSIrF/W8fvR6EN5lLZ5Vjw3Yi6uw0zw0pXYfIV16ohCnKC4i\r\n2k1HRVMQ+L/4Cb3qhY256z55WjeV7jH1KBrgXTsSFRMmT61ROXx44kuwVbml\r\nt6Y5TJRMR8oNRAKINy8wra5rWoU3P+oW7LQg/xmwXLPfoG/lFMKq1LHrmv0+\r\n/ePzhColkv4RHmt+JoGVDykQazl+6R5YA2iw6xi/weLiC86559ieenv+7wte\r\nwgBJ/zKvq2noBuLnlCbNdwU6BuLP+yiQ5eL1KEGvkVJtYZDomUI9XMRe9X4w\r\ngu+goS0be1y/QOWJJ0ljU3QLRBm1t9Lkqyou1SJTimErivKRgRa6LSMAXqqr\r\n8MzhAoXrj0qQFkJ76+maEpEcJTPZThAFAyETdt0W8Flz293V3bAl61LZbRwP\r\new1PYYUR4fgMctlzjdncQF+OpoiPinWJBf7zRM6YqTez0AOyL3YBcobwtv0a\r\nRmYFIlwwojwuDV5yKThjj9LbH58qlFuO8tMZDA3hnbEq/nRPDk4/pUFXyChG\r\nfn5B+E679DwNQos4RcqqIRpRAFHfe2TIRpnv9PoF41+xQ6nV4TuZVk99peWp\r\n3+UXG9C4P/gmsm76VZVTqXU2IpZhcJofZZo=\r\n=xZDj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_1.0.0_1651284019449_0.9149280608602781"},"_hasShrinkwrap":false},"1.0.1":{"name":"@animus-bi/redxs","version":"1.0.1","description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint './src/**/*.{js,ts,tsx}'","test":"ts-mocha -p tsconfig.json tests/**/*.test.ts","test:ci":"nyc ts-mocha -p tsconfig.json tests/**/*.test.ts","test:watch":"ts-mocha -p tsconfig.json tests/**/*.test.ts,tests/*.test.ts --watch","clean:dist":"node -e \"require('del').sync(['dist/**'])\"","prebuild":"npm run clean:dist","minify":"jsmin -o dist/index.min.js dist/index.js","build":"tsc --listFiles && npm run minify","watch":"tsc -w","start":"npm link && nodemon","amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","buildAndPublishBranch":"npm run build && npm run publish:branch","buildAndPublishBeta":"npm run build && npm run publish:beta && npm dist-tag add @animus-bi/redxs@$(npm -s run env echo '$npm_package_version') latest"},"repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"license":"MIT","homepage":"https://github.com/animus-bi/redxs#readme","devDependencies":{"@types/chai":"^4.2.13","@types/expect":"^24.3.0","@types/mocha":"^8.0.3","@types/node":"^14.11.2","@types/sinon":"^9.0.8","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","del":"^6.0.0","eslint":"^7.10.0","eslint-config-prettier":"^6.12.0","eslint-plugin-prettier":"^3.1.4","jsmin":"^1.0.1","mocha":"^8.1.3","nodemon":"^2.0.4","nyc":"^15.1.0","prettier":"^2.1.2","sinon":"^9.1.0","ts-mocha":"^7.0.0","typescript":"^4.0.3"},"dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","rxjs":"^6.6.3"},"gitHead":"26b6cedb16a12e66cbba815dbd00aed0fcdf1b54","bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"_id":"@animus-bi/redxs@1.0.1","_nodeVersion":"14.19.1","_npmVersion":"8.3.1","dist":{"integrity":"sha512-Jibc19evZi8eDdjkcWIk0SSJtfBSvPuI5G2cA/Q/FzUJlqcehMAJCf31sMM9tOXi5qKdDd1s/C9+wO9UnxgueA==","shasum":"de2abca9ed8233265cd0a4beee857da0df1e5617","tarball":"https://registry.npmjs.org/@animus-bi/redxs/-/redxs-1.0.1.tgz","fileCount":9,"unpackedSize":88349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHIksC5bDuEuJqvZfy7eyO0tX1UwSbbONfT/26OwvyAeAiBT/1SXrrpCZn/r//h0GhxCh1KgkMawDa50rGf4dg0Nkw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibSB4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqY8Q//ZVFSQ6besshHzK85246RJF/dPSPWU9W/g5tiKNheNU8ueRMb\r\nWjacWl7kNjeDjDX7Pg02KLinGWYKRpPrY8aROk7egNwDwVmXlaMpp1LCooS7\r\nATgXArUIoyQGR/KGieWac65E0gpJAwcldGqP8hYDQKWzYEAv+nBCTNna2oyb\r\nJeUc8oJ3LtevKjIAZY/sZj/NVkuTPeXcgbNrPv/aRq5e4YxUjgWeVg51JTd4\r\nsRS2Ywngombi2PpxFi076KE0hgBSYjYM24kSQ2+E9/CFKkOjcO76HNHzU5vQ\r\nPvfVQuv9nK1IfvG9tlIUzj99u8rfUC1Ld+T6RraJJLuKnB4ZlL+l5cYENts3\r\nD93oq9nKvYpt1Ct0auO6nnPXa8suUtTPGzTYT/tPx+JMbpI5+5iVSkvzdHZC\r\nXeSzuuV28LKv2zYl/8E69TXuHUWBR5Rx0X1M+dTlpK+wYz0tHjoUamxgeUmC\r\n9IhgjRmYZjzgFX8h7O7MLKLlUNgaSMfHooQKBW/o/XkAzcR4eIopT3z0aScF\r\nV6e6M6VAbtw1aOQ77Y5kk3JC0cxcoouuDkizYqFtzEgOSpxDAnQsOGH6AVnP\r\nGNsCpmYN73Kbb+vl9zP/lHSRfOobQTMYjgUi4K2oQT+crM3Gj9gHvK/dyLxn\r\nmUDGpwfaO+0HBhmjVtiqU7Vjs1NwcIPpb7c=\r\n=n0K3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redxs_1.0.1_1651318903954_0.9225113861095866"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-28T16:10:09.796Z","0.0.1-beta.1":"2020-12-28T16:10:10.189Z","modified":"2022-04-30T11:41:44.247Z","0.0.1-beta.2":"2020-12-28T16:10:47.849Z","0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.0":"2020-12-28T16:48:26.806Z","0.0.1-d6ecd1582c607376e1ace1878eadb8d5841d2c26.1":"2020-12-28T17:03:26.984Z","0.0.1-44b6d8236582d8135d51bf1be05c628e0f5a31ff.0":"2020-12-28T17:12:28.081Z","0.0.1-bf8c1b39.0":"2020-12-28T17:20:43.473Z","0.0.1-beta.0":"2020-12-28T17:26:10.541Z","0.0.1-bf8c1b39.1":"2020-12-28T17:27:40.843Z","0.0.1-beta.3":"2020-12-28T19:16:32.244Z","0.0.1-beta.4":"2020-12-28T19:17:29.544Z","0.0.1-beta.5":"2020-12-28T20:01:44.634Z","0.0.1-beta.6":"2020-12-28T20:11:24.528Z","0.0.1-beta.7":"2020-12-28T20:26:27.478Z","0.0.1-beta.8":"2020-12-28T20:36:46.699Z","0.0.1-1491714b.0":"2020-12-29T15:26:25.211Z","0.0.1-1491714b.1":"2020-12-29T17:17:55.864Z","0.0.1-1491714b.2":"2020-12-29T17:44:07.861Z","0.0.1-1491714b.3":"2020-12-29T18:52:40.686Z","0.0.1-1491714b.4":"2020-12-29T18:56:46.166Z","0.0.1-1491714b.5":"2020-12-29T19:04:51.735Z","0.0.1-1491714b.6":"2020-12-29T19:51:42.363Z","0.0.1-1491714b.7":"2020-12-29T20:46:08.068Z","0.0.1-1491714b.8":"2020-12-29T20:51:27.655Z","0.0.1-1491714b.9":"2020-12-29T20:52:26.056Z","0.0.1-1491714b.10":"2020-12-29T20:56:06.184Z","0.0.1-1491714b.11":"2020-12-29T21:15:47.751Z","0.0.1-1491714b.12":"2020-12-29T21:58:07.051Z","0.0.1-1491714b.13":"2020-12-29T22:06:16.145Z","0.0.1-1491714b.14":"2020-12-29T22:15:08.642Z","0.0.1-1491714b.15":"2020-12-30T11:00:14.104Z","0.0.1-1491714b.16":"2020-12-30T11:07:06.807Z","0.0.1-1491714b.17":"2020-12-30T11:13:01.478Z","0.0.1-1491714b.18":"2020-12-30T11:43:24.904Z","0.0.1-1491714b.19":"2020-12-30T11:50:37.626Z","0.0.1-1491714b.20":"2020-12-30T11:54:24.770Z","0.0.1-1491714b.21":"2020-12-30T12:30:54.383Z","0.0.1-1491714b.22":"2020-12-30T12:44:32.982Z","0.0.1-1491714b.23":"2020-12-30T12:54:19.470Z","0.0.1-beta.9":"2020-12-30T15:32:28.071Z","0.0.1-beta.10":"2020-12-30T16:32:56.067Z","0.0.1-b27e0336.0":"2020-12-30T17:53:33.324Z","0.0.1-b27e0336.1":"2020-12-30T18:28:17.339Z","0.0.1-b27e0336.2":"2021-01-02T03:19:26.344Z","0.0.1-b27e0336.3":"2021-01-02T13:00:05.545Z","0.0.1-b27e0336.4":"2021-01-02T13:29:52.087Z","0.0.1-beta.11":"2021-01-02T18:05:31.625Z","0.0.1-beta.12":"2021-01-02T18:10:13.667Z","0.0.1-beta.13":"2021-01-03T23:31:22.890Z","0.0.1-beta.14":"2021-01-07T14:47:47.896Z","0.0.1-beta.15":"2021-01-18T11:33:25.395Z","0.0.1-beta.16":"2021-01-30T00:10:43.094Z","0.0.1-beta.17":"2021-01-30T14:33:58.109Z","0.0.1-beta.18":"2021-01-30T14:39:09.525Z","0.0.1-beta.19":"2021-01-30T14:49:42.633Z","0.0.1-beta.20":"2021-01-30T14:56:44.981Z","0.0.1-beta.21":"2021-01-30T15:02:40.613Z","0.0.1-beta.22":"2021-02-06T01:27:54.333Z","0.0.1-6c28ce2c.1":"2021-05-08T19:33:57.918Z","0.0.1-6c28ce2c.2":"2021-05-08T19:40:46.791Z","0.0.1-6c28ce2c.3":"2021-05-08T19:50:43.933Z","0.0.1-6c28ce2c.4":"2021-05-08T22:39:48.706Z","0.0.1-beta.24":"2021-05-08T23:44:57.630Z","0.0.1-beta.25":"2021-05-09T16:46:16.061Z","0.0.1-beta.26":"2021-05-09T16:46:51.154Z","0.0.1-2573bc61.0":"2021-05-27T23:55:45.897Z","0.0.1-cce6464f.0":"2021-06-02T01:55:39.497Z","0.0.1-5f8affa4.0":"2022-04-30T00:03:12.548Z","0.0.1-beta.28":"2022-04-30T00:10:07.540Z","1.0.0":"2022-04-30T02:00:19.600Z","1.0.1":"2022-04-30T11:41:44.165Z"},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"description":"A super lightweight redux implementation, inspired by NGXS that can run in React, Angular, Express, or anywhere!","homepage":"https://github.com/animus-bi/redxs#readme","repository":{"type":"git","url":"git+https://github.com/animus-bi/redxs.git"},"author":{"name":"Animus BI","email":"animusmetrics@gmail.com"},"bugs":{"url":"https://github.com/animus-bi/redxs/issues"},"license":"MIT","readme":"# RedXS\n\n> RedXS is a super lightweight redux implementation, inspired by NGXS that can run anywhere! Asynchronous state management is a first class concept.\n> - Very simple composition\n> - Very little boilerplate\n> - Very easy to use and grasp\n> &nbsp;\n\n## Concepts\n\n- RedXS is basically just an async event bus. Actions are dispatched, which trigger any number of handlers. Handlers are attached via your store definition according to the Action `Type` they are attached to (No more large switch statements in reducers!!). Handlers given 2 parameters when executed: \n    1) Context to interact with the store's current state, which you can use to set/patch state or dispatch further actions.\n        - Available methods:\n            - `getState()`\n                - returns the store's slice of state at the time it's called.\n            - `getRootState()`\n                - returns the root store's state at the time it's called.\n            - `setState(obj: any)` \n                - overwrites the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `patchState(obj: Partial<any>)`\n                - overwrites only the properties on `obj` on the store's slice of state\n                - sends new values through any `state$` and `rootState$` subscriptions\n            - `dispatch(action: any)`\n                - dispatches actions (will trigger any/all handlers listening for the action).\n    2) The action that triggered the handler.\n        - should define a globally unique `type` or `Type` property.\n        - may also have add'l properties attached.\n\n## Some Demo/Example Apps\n\n- [React Todo Example](https://stackblitz.com/edit/react-redxs-todo-example-001-b27e03364)\n\n- [Angular Todo Example](https://stackblitz.com/edit/angular-redxs-todo-example-001-b27e03364)\n\n## Getting Started \n\n1. Run `npm install --save @animus-bi/redxs` to install the redxs library.\n\n2. Define an Action\n    - An action can be any object.\n        - It should define a unique property `type` or `Type`\n            - whether it's an instance property or a static/constructor property does not matter.\n            - in the absence of a `type` property, the constructor name is used\n    - Here is an example action as a class:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n\n        export class CreateTodo {\n            static Type = `[${Intent}] Create A TODO`;\n            constructor(public task: string) { }\n        }\n        ```\n    - Here is an example action as a function:\n        ```ts\n        // store/todo/actions.ts\n\n        export const Intent = 'todo';\n        \n        export const CreateTodo = (task) => ({\n            type: `[${Intent}] Create A TODO`,\n            task\n        })\n        ```\n    - You may have noticed the file name is just `actions.ts`\n        - All actions for this intent will be exported from here.\n            - This allows them to be imported more easily as a contained set of actions\n    - You may have also noticed we're exporting an `Intent` for our actions.\n        - This allows each handlers to execute in a more idempotent manner.\n\n3. Define a default state for your store\n    ```ts\n    // store/todo/state.ts\n\n    export class TodoState {\n        list: any[] = [];\n        hash: any = {};\n    }\n    ```\n4. Define a `Store` with a `StoreConfig`\n    ```ts\n    // store/todo/store.ts\n\n    export TodoStore = Store.Create<TodoState>(\n        /* StoreConfig */\n    )\n    ```\n    - `StoreConfig` is what drives the `Store` implementation.\n        - It establishes the state slice name in root state. \n        - It provides an initial state\n        - It allows you to attach handlers to specific actions that are dispatched.\n    - An example of a `StoreConfig` using an object literal\n        ```ts\n        // store/todo/store.ts\n\n        import * as TodosActions from './todos.actions'\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: { }\n        });\n        ```\n    - An example of a `StoreConfig` using the static `StoreConfig.create` method\n        ```ts\n        // store/todo/store.ts\n\n        import { Store, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n        const storeConfig = StoreConfig.create(\n            TodosActions.Intent,\n            new TodoState(),\n            { }\n        );\n        export TodoStore = Store.Create<TodoState>(storeConfig);\n        ```\n    You may have noticed, the `Intent` for a set of actions has become the name of our store, tying together our set of actions with our slice of application state.\n    - A `Store` instance has the following methods/properties:\n        - `state$: Observable<any>`\n            - returns an observable of the current store's slice of state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `rootState$: Observable<any>`\n            - returns an observable of the root store's state.\n            - new values are piped through any time `setState()` or `patchState()` are called\n        - `currentState(): any`\n            - returns an instance of the store's state slice at a given point in time (when called)\n        - `currentRootState(): any`\n            - returns an instance of the root store's state at a given point in time (when called).\n        - `dispatch(action: any|{type: string}): Observable<void>`\n            - returns an observable of type void\n            - triggers any action handlers registered in any other stores, matching the dispatched actions's `Type` or `type`.\n\n5. Now we can wire up some handlers in our store so that we can do things when Actions are dispatched.\n    - Handlers are not called directly by your code; instead, they are invoked when an Action of a matching `Type` is dispatched.\n    - Each handler is passed 2 arguments:\n        1. A `StateContext<T>`, which provides some operations to interact with state at the time the handler is executed.\n        2. The dispatched Action that triggered it.\n        ```ts\n        // store/todo/store.ts\n        \n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo)  => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            /* ... */\n        });\n        ```\n    - In order that the `createTodo` function is called when the Action is dispatched, we must add it to our store's StateConfig so that our Action `type` is the key name for the handler.\n    &nbsp;\n        \n    - Note: you are not calling the handler in the config, but rather, you're passing a reference to the handler. To avoid any lexical problems, use `.bind(this)` \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n    - You may also attach multiple handlers to a single dispatched action: \n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // Good/Ok\n                //\n                [TodosActions.CreateTodo.Type]: [\n                    preCreateTodo.bind(this) \n                    createTodo.bind(this)\n                ]\n            }\n        });\n\n        ```\n    - You should NOT list the same key twice in a store's action handler config (this is standard js stuff). \n        - You could do this, but the last one will probably win, and the other may not fire at all. Just use the one key with an array of handlers\n        ```ts\n        // store/todo.ts\n\n        import { Store, StateContext, StoreConfig } from '@animus-bi/redxs';\n        import * as TodosActions from './actions';\n        import { TodoState } from './state';\n\n        const preCreateTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            console.log('intend to create a todo');\n        }\n\n        const createTodo = (ctx: StateContext<TodoState>, action: TodosActions.CreateTodo) => {\n            const { list, hash } = ctx.getState();\n            list.push(action.payload);\n            hash[action.payload.task] = action.payload;\n            return ctx.patchState({ list, hash });\n        }\n\n        export TodoStore = Store.Create<TodoState>({\n            name: TodosActions.Intent,\n            initialState: new TodoState(),\n            handlers: {\n                //\n                // !!!!!!BAD!!!!!!!!!!!!!!\n                //\n                [TodosActions.CreateTodo.Type]: preCreateTodo.bind(this),\n                [TodosActions.CreateTodo.Type]: createTodo.bind(this)\n            }\n        });\n\n        ```\n\n6. To access state in anything, simply subscribe to your store's `state$` property wherever you want to receive state updates.\n    ```ts\n\n    import { TodoStore } from '../store/todo';\n\n    export class SomeComponent {\n\n        constructor() {\n            this.subscription = TodoStore.state$.subscribe((todoState) => {\n                this.todoState = todoState;\n            })\n        }\n    }\n    ```\n    - It is often useful to set a default state value in your component.\n        - To do that, call your store's `currentState()` method, which will return the current state of your slice (NOT NECESSARILY INITIAL STATE). \n            - This ensures resilience through re-render, initial loading, and late/lazy loading alike.\n        - JavaScript\n        ```js\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n\n            constructor() {\n                this.todoState = TodoStore.currentState();\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                })\n            }\n        }\n        ```\n        - TypeScript\n        ```ts\n        import { TodoStore } from '../store/todo';\n\n        export class SomeComponent {\n            todoState = TodoStore.currentState();\n            constructor() {\n                this.subscription = TodoStore.state$.subscribe((todoState) => {\n                    this.todoState = todoState;\n                });\n            }\n        }\n        ```\n\n9. Dispatch Actions from anywhere\n    - React example\n    ```jsx\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    export class SomeComponent {\n        addTodo(_e) {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n        render() {\n            return <div>\n                <input type=\"text\" id=\"todo-input\" value=\"\" />\n                <button onClick={this.addTodo}>add todo</button>\n            </div>\n        }\n    }\n    ```\n    - Angular example\n    ```ts\n    import { Component } from '@angular/core';\n    import { TodoStore } from '../store/todo';\n    import * as TodosActions from './store/todo/actions';\n\n    @Component({\n        selector: \"some-component\",\n        template: `\n        <div>\n            <input type=\"text\" id=\"todo-input\" value=\"\" />\n            <button (click)=\"addTodo()\">add todo</button>\n        </div>\n    `})\n    export class SomeComponent {\n        addTodo() {\n            const text = document.getElementById('todo-input').value\n            store.dispatch(new TodosActions.CreateTodo(text));\n        }\n    }\n    ```\n\n10. Combine dispatching and subscribing as needed for an overall async pub/sub model. See examples above for more info.\n\n\n\n","readmeFilename":"README.md","keywords":["redux","react","angular","unidirectional data","store","redux store","javascript","observable","rxjs","functional","ngxs","next js","redux epics","redux-observable","thunk","async"]}