1 line
42 KiB
Plaintext
1 line
42 KiB
Plaintext
{"_id":"state-local","_rev":"8-37a594cba74e3840cc0ebb87962b668a","name":"state-local","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.0":{"name":"state-local","version":"1.0.0","description":"Tiny, simple, and robust technique for defining and acting with local states","main":"dist/state-local.js","module":"src/index.js","types":"dist/types.d.ts","author":{"name":"Suren Atoyan","email":"contact@surenatoyan.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/suren-atoyan/state-local"},"bugs":{"url":"https://github.com/suren-atoyan/state-local/issues"},"homepage":"https://github.com/suren-atoyan/state-local#readme","keywords":["state","state management","local state"],"scripts":{"test":"jest","test-watch":"npm run build && jest --watch","coverage":"jest --collect-coverage","lint":"npx eslint src","prepublish":"npm test && npm run lint && npm run build","build":"npx webpack --mode=production && cp ./src/types.d.ts ./dist/"},"babel":{"presets":["@babel/preset-env"]},"husky":{"hooks":{"pre-commit":"npm test && npm run lint"}},"devDependencies":{"@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","babel-jest":"^26.2.2","babel-loader":"^8.1.0","eslint":"^7.6.0","husky":"^4.2.5","jest":"^26.2.2","webpack":"^4.44.1","webpack-cli":"^3.3.12"},"dependencies":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Suren Atoyan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"state-local@1.0.0","dist":{"shasum":"946ca3df77961b315caca73ff20394bb6a3a08f1","integrity":"sha512-jjWssTt1ifIBHrsI5/Y2F4piqhdvvCODz6vTsNqhAeFFwkFAWQrd8c4Jk9nHxQsQdMrHiHavQ96g4x4t5gf/1A==","tarball":"https://registry.npmjs.org/state-local/-/state-local-1.0.0.tgz","fileCount":9,"unpackedSize":20478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLDcJCRA9TVsSAnZWagAAXn8P/1BX+dOz9ykGEWiIGCb7\nQbMEIpkcnmpndZPKCY8G0PF6d75n9L8T/WWji2/fVUsl1pBKb+/qoHB9CcKZ\nurP+hItjUBmqAOHXn2C5kAnZkB0NTKI1okFoxylRGBuBoCt9m/lBqs3PQrmb\n4cibA18qnGD7vwfIV4d85g0j+MYxfkyZk+rkvdvOUbCzlL6dZAomZ02kzRAu\nB4QOnS4w93FCQX3cWQP9Ck8D/UKPLDwURPDI+UK3ohWsFDVvRydPmwIssPlY\n6Z5jmCuKGETdId97umUuZu6GlcJT1QAsTgMlyU1C2chEXXDNTb2S3CkQ9Q8T\nDVXgumvzjikNkhfOVQH7rfysSOl9FJVQ+O4280Sxnyt2iX1fifVuEWw5v4gc\nlSlR4y5+bPE1y8BiTNOgcGpu3Ce4k6/6FhyPW/A3dbRq/Y+k++kyb7x4gzKh\nba4K64EwG6vxJZiFLGjEisGAOa46VVHSV7PUDBns9Oo0frrqsu4S6F7XL0W8\nXmGXfQ1Qr19POAGu+NAC71KWa5a6YFG9F5kfjjtBIxw6/ezGrmYiFN1p5SO6\nNeo2meL+sVKNzPR9mOED7zT4Usle1wunyDTibJKCj8L+Zu5j9QvIyGpga4Bq\n/ZfOIUIpACdJHLQDRFl8WFuU0EOjr6VkoEFA0uQ6nRGsgaRGFA2HgAO3Cj2S\n4rIt\r\n=xGnN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGO2dZHf8/O/KLNK1H4RJI6PX0x7cUtuCgg0RjMCkupuAiEAloAnXwT1Q7vBqzpIblz4ts3e/XmnvW1P7qYvmAe3a0o="}]},"maintainers":[{"name":"surenat","email":"contact@surenatoyan.com"}],"_npmUser":{"name":"surenat","email":"contact@surenatoyan.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-local_1.0.0_1596733192703_0.4146302988715038"},"_hasShrinkwrap":false},"1.0.1":{"name":"state-local","version":"1.0.1","description":"Tiny, simple, and robust technique for defining and acting with local states","main":"dist/state-local.js","module":"src/index.js","types":"dist/types.d.ts","author":{"name":"Suren Atoyan","email":"contact@surenatoyan.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/suren-atoyan/state-local"},"bugs":{"url":"https://github.com/suren-atoyan/state-local/issues"},"homepage":"https://github.com/suren-atoyan/state-local#readme","keywords":["state","state management","local state"],"scripts":{"test":"jest","test-watch":"npm run build && jest --watch","coverage":"jest --collect-coverage","lint":"npx eslint src","prepublish":"npm test && npm run lint && npm run build","build":"npx webpack --mode=production && cp ./src/types.d.ts ./dist/"},"babel":{"presets":["@babel/preset-env"]},"husky":{"hooks":{"pre-commit":"npm test && npm run lint"}},"devDependencies":{"@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","babel-jest":"^26.2.2","babel-loader":"^8.1.0","eslint":"^7.6.0","husky":"^4.2.5","jest":"^26.2.2","webpack":"^4.44.1","webpack-cli":"^3.3.12"},"dependencies":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Suren Atoyan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"state-local@1.0.1","dist":{"shasum":"0d3c0a2bb610d3b81699b30e98fafa00bcf4ac9c","integrity":"sha512-CkiwT61ZhZd0/z183fcceu7+RSws/Sq5BT3RNQ2xK/Se9A/jn/4Z/eIe1bawoI9wNYC9wrcG2Drz+6GnjtKynA==","tarball":"https://registry.npmjs.org/state-local/-/state-local-1.0.1.tgz","fileCount":8,"unpackedSize":16468,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLDsuCRA9TVsSAnZWagAAtTYQAJY5OmilWSIhUE7TRJJ3\ngggaonhw7OpQiLfFPGMItMwpWUHKNG/rmr7BmqdxZor8OiB1JXbKaLho33ip\nGXOcpNy72NvBrFQpMYijh9JJWxZqAQZMyXpj+N4bsE3JTug1i0jzZYdrWywQ\nY4vXjcNuVRVcQbuOH8EPuZU5Yv++GHMZSDiJCt6YWoNF7QLXSldxkRo7MaM4\neB5Al4W2XqpR3nHm10ns93w9Fiz+8Ga3neCcHFTCjrwoon64mJh62gI93rP7\npC9Oh5EcRC2IWjA5FLG4vmBvJJsbCdmxDN1Wf9HElaBI/A72p2ge5yBbXrtd\n+9MUEn5fXqif1BeVJonIu+Sr312cR+Bf81QObC3xAiqi5xC61ul9VcIjifUb\nSLgezVc0urXsT43XgCtTNxlkfGq7Ub8p6BE8Ut9q+ug2XTQZNbeT5gPHw66u\noDiEk0dduKJg/GLOCQT2jeYP0akTTAJBVzwliV0squ3QvTJ78zt43EfiweZ0\n8xgnhalboXD8JhPtSIBrKEFg/XDi0a5ZqXzHmijAP+robfe794Sfs0Ci5ReL\n2vKxqaDqFLjpi70R6uuogGl/M0zAZq2K5/sJFObE9oI4yO1j9klTcZYfasGP\nHGPpXUhxUluU8kIYUtQJr0ejN1O7b4UAdtbo48rrVq9SabIQOryT4dMwyRdA\nXQ67\r\n=/AVM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9mD/zQCLLFcoamn4LK46hzEQVPOb1jjZ/AcdTw1cbzgIhAI3fPfVdeHhXfpA/yBxqjWy501yHoUH+jg9NrpAJEnSp"}]},"maintainers":[{"name":"surenat","email":"contact@surenatoyan.com"}],"_npmUser":{"name":"surenat","email":"contact@surenatoyan.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-local_1.0.1_1596734254452_0.27943926549475795"},"_hasShrinkwrap":false},"1.0.2":{"name":"state-local","version":"1.0.2","description":"Tiny, simple, and robust technique for defining and acting with local states","main":"dist/state-local.js","module":"dist/state-local.js","types":"dist/types.d.ts","author":{"name":"Suren Atoyan","email":"contact@surenatoyan.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/suren-atoyan/state-local"},"bugs":{"url":"https://github.com/suren-atoyan/state-local/issues"},"homepage":"https://github.com/suren-atoyan/state-local#readme","keywords":["state","state management","local state"],"scripts":{"test":"jest","test-watch":"npm run build && jest --watch","coverage":"jest --collect-coverage","lint":"npx eslint src","prepublish":"npm test && npm run lint && npm run build","build":"npx webpack --mode=production && cp ./src/types.d.ts ./dist/"},"babel":{"presets":["@babel/preset-env"]},"husky":{"hooks":{"pre-commit":"npm test && npm run lint"}},"devDependencies":{"@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","babel-jest":"^26.2.2","babel-loader":"^8.1.0","eslint":"^7.6.0","husky":"^4.2.5","jest":"^26.2.2","webpack":"^4.44.1","webpack-cli":"^3.3.12"},"dependencies":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Suren Atoyan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"state-local@1.0.2","dist":{"shasum":"db29a8d7def53b56f3130cd43d26509c175320bd","integrity":"sha512-uiMcyOXwR3TBt7Qq5GWn7D6CR3zY79XDZEbNi97i5uyPbpZQzBK/gM+azMr0aysCmjgB9LqfKGDWxJWXCU4BrQ==","tarball":"https://registry.npmjs.org/state-local/-/state-local-1.0.2.tgz","fileCount":8,"unpackedSize":17397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr9tMCRA9TVsSAnZWagAAPUQP+QEriaSQo2Yv9jRiNQPw\ns4Rfxu/eNei3s61gqf2JgjOodlLP0dHQpStLgsIuUXwA5XPdvp9e5YhA+xLS\nyaPVB/YfcREvls8DvlMq1kLeafFRhnXJ8fIrFQxDMwvQ5YOhY8ydr8w+l/H0\n9LufD1EiwKFZIfmn9uF+6gLikH76cZam+jQCKSdARKNz0uYgAoGjnIcCL3o0\n3woL0c3wsWlgo7z6XCAM/BeDp2i0IlLVayaewn4MQSzljCXiNSDgAuz4j65K\np3Lh+F30fK+hraAGY0NgYrrU/hUCFc4GzJ/gMdH7csXA27VKfqz+0pkBIp9C\neTv3Ogyo6ucsFwxMwtX0DOx/uIV37ftHGr6XqcUUR/r7ErkHliLqrT5aMtEl\nDZ4LI5G/imRs1sapMQfYC/Iz1djaVcl/QT5CNAMBzxbYZMh91JzoOmXlI6Uy\noF84qIKpmdhqcmqyBdDS0CXJ/zDOkFZkGdVpICqcrHdEhQBWtGab+jsC4d5N\nl3iLUyx8f6T7XGTMlbz8qeFsaBGHvlrUif9rz+XjeBUqEpKN7u2EZL0LwI6M\nqSeq38KGUJPBzCu+fMOLgdNVMy/Bvfc0dqHxnaj9O9ssn/iZckOXdsgaCDio\nskbZ928465thq+VujtoFaP2sAKVqc4B0IZ2CF0PLJeSlzvHhfNkp7ZFNB6sS\nHQQR\r\n=fjVA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrHMXS6gWJCUdEt9ncbcuoW/vGub+DPPtFm7Lolz29rQIhAOV4lQMl3RC47RIVhzwR+SMK/H0cxv1fphELczFwvr5n"}]},"_npmUser":{"name":"surenat","email":"contact@surenatoyan.com"},"directories":{},"maintainers":[{"name":"surenat","email":"contact@surenatoyan.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-local_1.0.2_1605360459645_0.33887884443444993"},"_hasShrinkwrap":false},"1.0.3":{"name":"state-local","version":"1.0.3","description":"Tiny, simple, and robust technique for defining and acting with local states","main":"dist/state-local.js","module":"src/index.js","types":"dist/types.d.ts","author":{"name":"Suren Atoyan","email":"contact@surenatoyan.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/suren-atoyan/state-local"},"bugs":{"url":"https://github.com/suren-atoyan/state-local/issues"},"homepage":"https://github.com/suren-atoyan/state-local#readme","keywords":["state","state management","local state"],"scripts":{"test":"jest","test-watch":"npm run build && jest --watch","coverage":"jest --collect-coverage","lint":"npx eslint src","prepublish":"npm test && npm run lint && npm run build","build":"npx webpack --mode=production && cp ./src/types.d.ts ./dist/"},"babel":{"presets":["@babel/preset-env"]},"husky":{"hooks":{"pre-commit":"npm test && npm run lint"}},"devDependencies":{"@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","babel-jest":"^26.2.2","babel-loader":"^8.1.0","eslint":"^7.6.0","husky":"^4.2.5","jest":"^26.2.2","webpack":"^4.44.1","webpack-cli":"^3.3.12"},"dependencies":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Suren Atoyan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"state-local@1.0.3","dist":{"shasum":"0854917905e9cbde1690fb415a581bfbf5cdfcab","integrity":"sha512-jFIhukkEP3SAk/pHSq0v4FedpwPQ8LfnsejovQqvj8epmT8+T9/E5xkCeJVsJXmSDxnILDkypLYVucrWGl3kog==","tarball":"https://registry.npmjs.org/state-local/-/state-local-1.0.3.tgz","fileCount":18,"unpackedSize":32821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsQy3CRA9TVsSAnZWagAAXdMP/1jO0s0ytUIg6o1rIDqS\n5DkLq+r8e93FEcJpAbW0DvESuk/igG42uJ52aTrqI8TmNXt7zrTQO4CGa0v1\n5hB38zhftuWzJEJA/mTKTOCEUfKdYVDEW7/FqTWPIS7yNmLh+/3/A2B0vtK5\niHJF+wlzy96C4Fxy52c8F6t6arK3zs5XNJEQskzuGcnG/elAKjVpgRZggKzR\nt5M92ubdv4B98YOIg/NJPkoSmnIu9mKmtUPEIDebODqI3Ri0vb8RUeV4WRlS\n4XNuwhLbmqJDNvE/zOxpIlba+W5BNfVss5qiGLZe8DBNnR6s+yn1sRYb6ZwU\nlCU+wVSNHjatazyjfMaLZ8We1317hCxvpEq2SVuX2uL3lyNgLomkoGTh4Ep4\nk4lI6CDowEZHB+5Sc6c+UZ4S2FnBqvR5h/M6eUlXNbyCeXy3wXZH4NWYQedl\nhP0FShL84YrwMmfhv0ZqwPeWtGmnmKpDqqvLjcJYQd89b/DZTu0CXGlP147M\n6cVG2UbFQMz/fd7yaiP7W3mLhq/LrpAtrm1NLMLtEDj6vWf4C1lvWfNdiSRT\nVE+/3WIX88sqOXgdHHb0GldRaYvi+4hGKrMGARxSMWNBBpLYQ/sA4VNooMYt\nDXvBl6dlsfc9098wR1v7mb4vjiSY84kiuUOI6PlKNFTS2xeb23vyN8HjJJ+A\n5f+N\r\n=Bwa6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJ97g6ClW3c851iLp5K1ifd8XRVt5Bd1OokNccygnwtgIgdFYHfVSH1+FAQ36khxTuxUi0TAMGLEv1iCkCVJIK1ZI="}]},"_npmUser":{"name":"surenat","email":"contact@surenatoyan.com"},"directories":{},"maintainers":[{"name":"surenat","email":"contact@surenatoyan.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-local_1.0.3_1605438646689_0.019150403851670772"},"_hasShrinkwrap":false},"1.0.4":{"name":"state-local","version":"1.0.4","description":"Tiny, simple, and robust technique for defining and acting with local states","main":"dist/state-local.js","module":"dist/state-local.js","types":"dist/types.d.ts","author":{"name":"Suren Atoyan","email":"contact@surenatoyan.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/suren-atoyan/state-local"},"bugs":{"url":"https://github.com/suren-atoyan/state-local/issues"},"homepage":"https://github.com/suren-atoyan/state-local#readme","keywords":["state","state management","local state"],"scripts":{"test":"jest","test-watch":"npm run build && jest --watch","coverage":"jest --collect-coverage","lint":"npx eslint src","prepublish":"npm test && npm run lint && npm run build","build":"npx webpack --mode=production && cp ./src/types.d.ts ./dist/"},"babel":{"presets":["@babel/preset-env"]},"husky":{"hooks":{"pre-commit":"npm test && npm run lint"}},"devDependencies":{"@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","babel-jest":"^26.2.2","babel-loader":"^8.1.0","eslint":"^7.6.0","husky":"^4.2.5","jest":"^26.2.2","webpack":"^4.44.1","webpack-cli":"^3.3.12"},"dependencies":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Suren Atoyan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"state-local@1.0.4","dist":{"shasum":"aaa6a39d00728fa5ab8d3f3b7e52dd0527f1c926","integrity":"sha512-ea0qFgZAlqjuwyUnIEST/sDxKhbW3CEcZJVR6ay3hCCXFPDfONsXjslPjHzhhtM/PFlIv0FTpteg3H5wFTNDyw==","tarball":"https://registry.npmjs.org/state-local/-/state-local-1.0.4.tgz","fileCount":8,"unpackedSize":17558,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsSkdCRA9TVsSAnZWagAAgmcP/AmPSUW9qNxsEq//ByEX\npSMQxGAF5S8OGjiaCRn/NFHZDSN9ohjlE7Z4BqdswSaKkM/LtLyfa+aZWpoH\nj2Nvrk86OQAkp/1K4BDzQQbNi4oFdG2ibQtR1Tm6v5v3zt2ZI7oJ5P0md7CI\nAti+Yv0OU9PktHhIJwefyrqQAgEO60psqUd6KhELhvvqjAkLAOS9KCgY6Qs+\nhJX/s9nF1XTfdm6moVZIO1ap2ybbO9CtSLKKSY5/er7Q6y+rYMF5awAmCZz2\n4bXxVBsNljSDZWLv0EXc1JkhndVzL4EphVxAtYOVuhq2UfzwGRWHSJ+b2DFE\nUimSmln2QyKS6P+hN9LBL4M6KYrFcnI0GfsxSEbYOM4xb6nVEqRwkc/ohEzH\n1LWhK413iTPMV2bDwJjQNI9Q3LEDoGGXrOJBxt7hzsbicHhznMzlglWmebu6\nPTrvcu6nx2xs56vVZhdxumXqXZic/D10mFNzIFdn1l3cdcZVCb8eYeaaJGdL\nJ/l4/2vfcI/8k92EB55HpfGR+bWujNrXS1+TJoIFKguWnK4+g73ZREGrS7Pu\nv7n7ST3Bw6A/h49fYDnAVRJqL4Qil0MKBLl2h3MtoAKuRcquO4odHcwmsGLU\nJaF/VdA8TU1gvNIvMDbY/UkJ3cVhHWFykt29tx1wnK+HihDdO+ft4SPqU37D\n8WRg\r\n=vrYU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPcOuj6muMTo+v+QbEx5Dxy2UuExlHUSEuQ7YLO/IAgAiAd7O341RbvwhxzYKN0SGdBQhKKDhK2AqOJPKN0KQb1Wg=="}]},"_npmUser":{"name":"surenat","email":"contact@surenatoyan.com"},"directories":{},"maintainers":[{"name":"surenat","email":"contact@surenatoyan.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-local_1.0.4_1605445917351_0.9769763970366694"},"_hasShrinkwrap":false},"1.0.5":{"name":"state-local","version":"1.0.5","description":"Tiny, simple, and robust technique for defining and acting with local states","main":"lib/cjs/state-local.js","module":"lib/es/state-local.js","unpkg":"lib/umd/state-local.js","types":"lib/types.d.ts","author":{"name":"Suren Atoyan","email":"contact@surenatoyan.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/suren-atoyan/state-local"},"bugs":{"url":"https://github.com/suren-atoyan/state-local/issues"},"homepage":"https://github.com/suren-atoyan/state-local#readme","keywords":["state","state management","local state"],"scripts":{"test":"jest","test-watch":"npm run build && jest --watch","coverage":"jest --collect-coverage","lint":"npx eslint src","prepublish":"npm test && npm run lint && npm run build","build":"rollup -c && cp ./src/types.d.ts ./lib/"},"babel":{"presets":["@babel/preset-env"]},"husky":{"hooks":{"pre-commit":"npm test && npm run lint"}},"devDependencies":{"@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"^11.0.1","@rollup/plugin-replace":"^2.3.4","babel-jest":"^26.2.2","babel-loader":"^8.1.0","eslint":"^7.6.0","husky":"^4.2.5","jest":"^26.2.2","rollup":"^2.35.1","rollup-plugin-terser":"^7.0.2"},"dependencies":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Suren Atoyan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"state-local@1.0.5","dist":{"shasum":"b41d463eddc4fb1df6272c17667c3b709935ee27","integrity":"sha512-nm+ltq7N/HonbA71JND5de+APruf38M66tanNJQ8SNOB8+5O2iAdzzQ/UFZaosUG/yKJnGW1Q0Ddc3hm99zSpw==","tarball":"https://registry.npmjs.org/state-local/-/state-local-1.0.5.tgz","fileCount":20,"unpackedSize":60577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8fUyCRA9TVsSAnZWagAAI3AQAJYpdOad9dcKQaNDN8uM\nzwhg9IkKpB6kRJknoX5GH328tzavPP4bHeYNWWrWs7sKqUcM5U1RZKqp4d2Y\nIISGaTAb+kAzjFJYIzchUGAyMmXxY91AtvrYXiNQg5FGpGjmE7pU6+ezI+p1\nXARSKm6lUs0Td438mLzml0XI7xqFWlSvDs2PfcIEmZUZQessoQSpvXXuMpw1\nvRAMp59r7o1rAKtX7vtiHk9JGPAvDSK8pZgmquRy0x59vFo2TtLD939lJwCR\ndZxPAuPYPRxr6a62CxbRmmu4+vAYUBFmfPFigSxTodAbe0GkDufZhXEcQnRL\nCZaPPhryrYsZeRrGEfpg5UWQdf8stARyCiPsSi0WxG8apB8cZDBg6M0azsiX\nIjcp5QUyf0SD5g9mXnnzV/zFShRSvNuFv37a5CuNy1nbWlu3zg7UFcN7vmmv\nKBPnFORySFi85Gw/4vUfHZSzm8IJDSegAyuwidk7rN9Pyqj/DKd2U9GkWyUp\nLNKfFLc1GmD0NDkarpgdNzn04KD3VdYKBdGxFlMrBG/SZi0wqlC7QYdDH5IB\nMNE/YnJYnhQynkwr9+oaYVvGPVKzoOCY+yJXMSeDyFbVriHmjPKaYlrdS+ZJ\n3YgtEdSoDrDzJ20obB+zyNWXJD5st7C0CarnY4wDVv51KN32d2WjqHzoI1s4\nz90v\r\n=+cYN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaX9nkTbT3MqD/Vw/y4rxxgsRofHKbiuKtQdHMYTj9iQIgNEh6uUdYPEtx8UK1ZRLNeBjbyarNM9iEI4sQL0n1QfY="}]},"_npmUser":{"name":"surenat","email":"contact@surenatoyan.com"},"directories":{},"maintainers":[{"name":"surenat","email":"contact@surenatoyan.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-local_1.0.5_1609692465538_0.7195640294937018"},"_hasShrinkwrap":false},"1.0.6":{"name":"state-local","version":"1.0.6","description":"Tiny, simple, and robust technique for defining and acting with local states","main":"lib/cjs/state-local.js","module":"lib/es/state-local.js","unpkg":"lib/umd/state-local.js","types":"lib/types.d.ts","author":{"name":"Suren Atoyan","email":"contact@surenatoyan.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/suren-atoyan/state-local"},"bugs":{"url":"https://github.com/suren-atoyan/state-local/issues"},"homepage":"https://github.com/suren-atoyan/state-local#readme","keywords":["state","state management","local state"],"scripts":{"test":"jest","test-watch":"npm run build && jest --watch","coverage":"jest --collect-coverage","lint":"npx eslint src","prepublish":"npm test && npm run lint && npm run build","build":"rollup -c && cp ./src/types.d.ts ./lib/"},"babel":{"presets":["@babel/preset-env"]},"husky":{"hooks":{"pre-commit":"npm test && npm run lint"}},"devDependencies":{"@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"^11.0.1","@rollup/plugin-replace":"^2.3.4","babel-jest":"^26.2.2","babel-loader":"^8.1.0","eslint":"^7.6.0","husky":"^4.2.5","jest":"^26.2.2","rollup":"^2.35.1","rollup-plugin-terser":"^7.0.2"},"dependencies":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Suren Atoyan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"state-local@1.0.6","dist":{"shasum":"137088a941d361a0f11829965b2f46ec7e9968b4","integrity":"sha512-+IlgkKVNVmGwt9fqBaU76y/Fvj0fuQGDQESnFBD9kVW6T0/HtDyRXeDXmEba3dOMfMufZC6PuKO9eQ9pKJtmiA==","tarball":"https://registry.npmjs.org/state-local/-/state-local-1.0.6.tgz","fileCount":15,"unpackedSize":37337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8gYtCRA9TVsSAnZWagAAGSkP/3PU66jXAcaebDFJY4V/\ncOgTjOoGsHjYRJNxVvlPa8HwLvdoWObM/yXDBSvLW7fQdgUBgpAlgEtIgLvL\nyCLTjMYNmEJ3W1SHNpPBaFd4ThYhp+UxTtgym8KlaLFEICJKnko5Npu5yTNr\nZNvAJpCx0pcfBi6doTFTBebxPVRcE2j6unKkntsu1pW/sA6IBWeGSH9OSlVb\nXzbpfBlrRa1n3qOThqiJ2qdyepmJkLqKOXy8pWqg3YWbBTiw7qzUkmXsz/oC\nUa8Smn9kvEqyC64g4m2lHqYP80HYNUeky4nwdt5z1AbWJ1cBhKTrjYWTtQ5E\n3YKSYKRDrXqbxB8B7BkvL6v77/q2a/xGECmN8smvjf5gBB/wj4/nk1mlctxU\nocooF3Hfdhla0bHVEg4We1N9EWSF/Chp+mAhWuuNtO9M0n+m5vhVNsRmqd0p\nXnQwZbU6CLqcZrhgOUfMy3gU0DZywKRbWQQ5XjluSocuhuAS7PXdFxutmcMf\nd8PTXWXv6qxKHiv9bhfQhy5ELMauMm6M7hHmsKcjqi3DyjthpLqwBSuG3L+5\nwTs0yS9psu+XBowZWUdxOTKeeco1SS2EsDVeRzNnS3MkOY+p5eA8Q9HUvSbu\n7+wdCuyp2LIJnHjldCekx5nSVT4DSb1vo41UKQVUGp3E2ZZFcRQYhABT0NS7\nVRcz\r\n=Ld32\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXef2f/4m+4o2ViGnvZLw8txZ5aTzKw0hh0XxpBAupLAiBvufEvxj3ON3PXFMVFdn+O7DWU3hKzM6gtGYP030VlKw=="}]},"_npmUser":{"name":"surenat","email":"contact@surenatoyan.com"},"directories":{},"maintainers":[{"name":"surenat","email":"contact@surenatoyan.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-local_1.0.6_1609696812688_0.7191180775187851"},"_hasShrinkwrap":false},"1.0.7":{"name":"state-local","version":"1.0.7","description":"Tiny, simple, and robust technique for defining and acting with local states","main":"lib/cjs/state-local.js","module":"lib/es/state-local.js","unpkg":"lib/umd/state-local.min.js","jsdelivr":"lib/umd/state-local.min.js","types":"lib/types.d.ts","author":{"name":"Suren Atoyan","email":"contact@surenatoyan.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/suren-atoyan/state-local"},"bugs":{"url":"https://github.com/suren-atoyan/state-local/issues"},"homepage":"https://github.com/suren-atoyan/state-local#readme","keywords":["state","state management","local state"],"scripts":{"test":"jest","test-watch":"npm run build && jest --watch","coverage":"jest --collect-coverage","lint":"npx eslint src","prepublish":"npm test && npm run lint && npm run build","build":"rollup -c && cp ./src/types.d.ts ./lib/"},"babel":{"presets":["@babel/preset-env"]},"husky":{"hooks":{"pre-commit":"npm test && npm run lint"}},"devDependencies":{"@babel/core":"^7.11.0","@babel/preset-env":"^7.11.0","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"^11.0.1","@rollup/plugin-replace":"^2.3.4","babel-jest":"^26.2.2","babel-loader":"^8.1.0","eslint":"^7.6.0","husky":"^4.2.5","jest":"^26.2.2","rollup":"^2.35.1","rollup-plugin-terser":"^7.0.2"},"dependencies":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Suren Atoyan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"state-local@1.0.7","dist":{"shasum":"da50211d07f05748d53009bee46307a37db386d5","integrity":"sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==","tarball":"https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz","fileCount":15,"unpackedSize":37319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9tPjCRA9TVsSAnZWagAAaYAP/jBfdwfMFauubRr35Bw8\n+sZobETPbbLm+duSpnDqUfH+9xRNmTPg6YEwnCWuyvtJw1rXOopvgv8IZ/z7\nHCfdETmN+lDKg6fkz0BN9XlIapLUQkVY0qzUJ95mS41HW6K1P0sivpXtLT9o\novND8YIx59P7gCTbklhWkadqwycQZq4Leb35BuyrtrneSddHPJvNJOP+e317\nlIz/P6+n6mWHpcmhxW7m4/rC5f/LcFqhtuwiczttwHDcFGu+bNYoY1dZZy+7\nU0O8K5pXVE2YpuLzaaYa8Cn6Tk142NwV6y/MUgr0UxuK+Sl/g8JDA3JkDICg\njslzkfWaeQQegt0czQY+VkE9X9NBcdJXtw3UihmV5gvL0mPHo1wrsvwlSn5l\nwTaJVgRh+bqXTp0clZTEB5dyhCucgY2AVojwRZwVd6NytPlNOv/ZhoKigcRb\nZyRdrf904uEwONZ9K5es8+KizFRL8onyoBazAcs9f7mjG5oCXbVE0BbeQ6s6\nlwg2yGa9BwmENqiYJ0NHgX3prhuh15lnybTw3rGQ1PfTjocSlae8KPA3h4/S\nIzi6iHLXgeUYmIS3Gs42P4ft0Ed/xsSY+t2liA+ab6RLmc/W1OYzgSOgNIOX\nK7vQDwEfUdSOBS0/mD/vdpgcsRYhUwI9EGWL7qi0PIyZcQeYvyj7pKvl+5js\ncucq\r\n=BUTc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzPCiYxPxB/xUwh5IbG1ywiyNvkPCjG+ij4xy7Vm2uGwIgS2Yg48rNOx8yWkVmt86Lm0GHkcqCW2kl5wgtFq4klC4="}]},"_npmUser":{"name":"surenat","email":"contact@surenatoyan.com"},"directories":{},"maintainers":[{"name":"surenat","email":"contact@surenatoyan.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-local_1.0.7_1610011619289_0.5941812232993984"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-06T16:59:52.702Z","1.0.0":"2020-08-06T16:59:52.820Z","modified":"2022-05-18T16:09:21.306Z","1.0.1":"2020-08-06T17:17:34.550Z","1.0.2":"2020-11-14T13:27:39.777Z","1.0.3":"2020-11-15T11:10:46.811Z","1.0.4":"2020-11-15T13:11:57.460Z","1.0.5":"2021-01-03T16:47:45.740Z","1.0.6":"2021-01-03T18:00:12.815Z","1.0.7":"2021-01-07T09:26:59.423Z"},"maintainers":[{"name":"surenat","email":"contact@surenatoyan.com"}],"description":"Tiny, simple, and robust technique for defining and acting with local states","homepage":"https://github.com/suren-atoyan/state-local#readme","keywords":["state","state management","local state"],"repository":{"type":"git","url":"git+https://github.com/suren-atoyan/state-local"},"author":{"name":"Suren Atoyan","email":"contact@surenatoyan.com"},"bugs":{"url":"https://github.com/suren-atoyan/state-local/issues"},"license":"MIT","readme":"# State · [](https://www.npmjs.com/package/state-local) [](https://github.com/suren-atoyan/state-local/blob/master/LICENSE) [](https://openbase.io/js/state-local?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge) [](https://bundlephobia.com/result?p=state-local) [](https://www.npmjs.com/package/state-local) [](https://github.com/suren-atoyan/state-local/pulls)\n\n:zap: Tiny, simple, and robust technique for defining and acting with local states (for all js environments - node, browser, etc.)\n\n## Synopsis\n\nA local state for modules, functions, and other ECs\n\n## Motivation\n\nWe all love functional programming and the concepts of it. It gives us many clean patterns, which we use in our code regardless of exactly which paradigm is in the base of our codebase. But sometimes, for some reason, we can't keep our code \"clean\" and have to interact with items that are outside of the current lexical environment\n\nFor example:\n\n:x:\n```javascript\nlet x = 0;\nlet y = 1;\n\n// ...\nfunction someFn() {\n // ...\n x++;\n}\n\n// ...\nfunction anotherFn() {\n // ...\n y = 6;\n console.log(x);\n}\n\n// ...\nfunction yetAnotherFn() {\n // ...\n y = x + 4;\n x = null; // 🚶\n}\n```\n\nThe example above lacks control over the mutations and consumption, which can lead to unpredictable and unwanted results. It is just an example of real-life usage and there are many similar cases that belong to the same class of the problem\n\n**The purpose of this library is to give an opportunity to work with local states in a clear, predictable, trackable, and strict way**\n\n:white_check_mark:\n\n```javascript\nimport state from 'state-local';\n\nconst [getState, setState] = state.create({ x: 0, y: 1 });\n\n// ...\nfunction someFn() {\n // ...\n setState(state => ({ x: state.x + 1 }));\n}\n\n// ...\nfunction anotherFn() {\n // ...\n setState({ y: 6 });\n const state = getState();\n console.log(state);\n}\n\n// ...\nfunction yetAnotherFn() {\n // ...\n setState(state => ({ y: state.x + 4, x: null }));\n}\n```\n\n[codesandbox](https://codesandbox.io/s/motivation-1-xv5el?file=/src/index.js)\n\nWe also can track the changes in items:\n\n```javascript\nimport state from 'state-local';\n\nconst [getState, setState] = state.create({ x: 0, y: 1 }, {\n x: latestX => console.log('(⌐▀ ̯ʖ▀) Houston we have a problem; \"x\" has been changed. \"x\" now is:', latestX),\n y: latestY => console.log('(⌐▀ ̯ʖ▀) Houston we have a problem; \"y\" has been changed. \"y\" now is:', latestY),\n});\n\n// ...\n```\n\n[codesandbox](https://codesandbox.io/s/motivation-2-ivf7d)\n\nWe can use the subset of the state in some execution contexts:\n\n```javascript\nimport state from 'state-local';\n\nconst [getState, setState] = state.create({ x: 5, y: 7 });\n\n// ...\nfunction someFn() {\n const state = getState(({ x }) => ({ x }));\n\n console.log(state.x); // 5\n console.log(state.y); // ❌ undefined - there is no y\n}\n```\n\n[codesandbox](https://codesandbox.io/s/motivation-3-femne)\n\nAnd much more...\n\n## Documentation\n\n#### Contents\n\n* [Installation](#installation)\n* Usage\n * [create](#create)\n * [initial state](#initial-state)\n * [handler](#handler)\n * [getState](#getstate)\n * [selector](#selector)\n * [setState](#setstate)\n\n#### Installation\n\nYou can install this library as an npm package or download it from the CDN and use it in node or browser:\n\n```bash\nnpm install state-local\n```\nor\n```bash\nyarn add state-local\n```\n\nor\n\n```html\n<script src=\"https://unpkg.com/state-local/dist/state-local.js\"></script>\n\n<script>\n// now it is available in `window` (window.state)\nconst [getState, setState] = state.create({ x: 11, y: 13 });\n// ...\n</script>\n```\n\n#### create\n\nThe default export has a method called `create`, which is supposed to be a function to create a state:\n\n```javascript\nimport state from 'state-local';\n\n// state.create\n\n// ...\n```\n\n[codesandbox](https://codesandbox.io/s/docs-create-t1cxe)\n\n`create` is a function with two parameters:\n\n1) [`initial state`](#initial-state) (**required**)\n2) [`handler`](#handler) (**optional**)\n\n#### initial state\n\n`initial state` is a base structure and a value for the state. It should be a non-empty object\n\n```javascript\nimport state from 'state-local';\n\n/*\nconst [getState, setState] = state.create(); // ❌ error - initial state is required\nconst [getState, setState] = state.create(5); // ❌ error - initial state should be an object\nconst [getState, setState] = state.create({}); // ❌ error - initial state shouldn\\'t be an empty object\n*/\n\nconst [getState, setState] = state.create({ isLoading: false, payload: null }); // ✅\n// ...\n```\n\n[codesandbox](https://codesandbox.io/s/docs-initial-state-22i3s)\n\n#### handler\n\n`handler` is a second parameter for `create` function and it is optional. It is going to be a handler for state updates. Hence it can be either a function or an object.\n\n- If the handler is a function than it should be called immediately after every state update (with the latest state)\n- If the handler is an object than the keys of that object should be a subset of the state and the values should be called immediately after every update of the corresponding field in the state (with the latest value of the field)\n\nsee example below:\n\nif `handler` is a function\n```javascript\nimport state from 'state-local';\n\nconst [getState, setState] = state.create({ x: 2, y: 3, z: 5 }, handleStateUpdate /* will be called immediately after every state update */);\n\nfunction handleStateUpdate(latestState) {\n console.log('hey state has been updated; the new state is:', latestState); // { x: 7, y: 11, z: 13 }\n}\n\nsetState({ x: 7, y: 11, z: 13 });\n// ...\n```\n\n[codesandbox](https://codesandbox.io/s/handler-function-uevxj)\n\nif `handler` is an object\n```javascript\nimport state from 'state-local';\n\nconst [getState, setState] = state.create({ x: 2, y: 3, z: 5 }, {\n x: handleXUpdate, // will be called immediately after every \"x\" update\n y: handleYUpdate, // will be called immediately after every \"y\" update\n // and we don't want to listen \"z\" updates 😔\n});\n\nfunction handleXUpdate(latestX) {\n console.log('(⌐▀ ̯ʖ▀) Houston we have a problem; \"x\" has been changed. \"x\" now is:', latestX); // ... \"x\" now is 7\n}\n\nfunction handleYUpdate(latestY) {\n console.log('(⌐▀ ̯ʖ▀) Houston we have a problem; \"y\" has been changed. \"y\" now is:', latestY); // ... \"y\" now is 11\n}\n\nsetState({ x: 7, y: 11, z: 13 });\n// ...\n```\n\n[codesandbox](https://codesandbox.io/s/handler-object-8k0pt)\n\n#### getState\n\n`getState` is the first element of the pair returned by `create` function. It will return the current state or the subset of the current state depending on how it was called. It has an optional parameter `selector`\n\n```javascript\nimport state from \"state-local\";\n\nconst [getState, setState] = state.create({ p1: 509, p2: 521 });\n\nconst state = getState();\nconsole.log(state.p1); // 509\nconsole.log(state.p2); // 521\n\n// or\n\nconst { p1, p2 } = getState();\nconsole.log(p1); // 509\nconsole.log(p2); // 521\n```\n\n[codesandbox](https://codesandbox.io/s/getstate-zn3hj)\n\n#### selector\n\n`selector` is a function that is supposed to be passed (optional) as an argument to `getState`. It receives the current state and returns a subset of the state\n\n```javascript\nimport state from 'state-local';\n\nconst [getState, setState] = state.create({ p1: 389, p2: 397, p3: 401 });\n\nfunction someFn() {\n const state = getState(({ p1, p2 }) => ({ p1, p2 }));\n console.log(state.p1); // 389\n console.log(state.p2); // 397\n console.log(state.p3); // ❌ undefined - there is no p3\n}\n```\n\n[codesandbox](https://codesandbox.io/s/selector-vjmdu)\n\n#### setState\n\n`setState` is the second element of the pair returned by `create` function. It is going to receive an object as a change for the state. The change object will be shallow merged with the current state and the result will be the next state\n\n**NOTE: the change object can't contain a field that is not specified in the \"initial\" state**\n\n```javascript\nimport state from 'state-local';\n\nconst [getState, setState] = state.create({ x:0, y: 0 });\n\nsetState({ z: 'some value' }); // ❌ error - it seams you want to change a field in the state which is not specified in the \"initial\" state\n\nsetState({ x: 11 }); // ✅ ok\nsetState({ y: 1 }); // ✅ ok\nsetState({ x: -11, y: 11 }); // ✅ ok\n```\n\n[codesandbox](https://codesandbox.io/s/setstate-1-u4fq0)\n\n`setState` also can receive a function which will be called with the current state and it is supposed to return the change object\n\n```javascript\nimport state from 'state-local';\n\nconst [getState, setState] = state.create({ x:0, y: 0 });\n\nsetState(state => ({ x: state.x + 2 })); // ✅ ok\nsetState(state => ({ x: state.x - 11, y: state.y + 11 })); // ✅ ok\n\nsetState(state => ({ z: 'some value' })); // ❌ error - it seams you want to change a field in the state which is not specified in the \"initial\" state\n```\n\n[codesandbox](https://codesandbox.io/s/smoosh-wildflower-nv9dg)\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"} |