{"_id":"redux-cirquit","_rev":"35-77f9a0eb9427238b379cfaeb2d2d4de2","name":"redux-cirquit","dist-tags":{"latest":"2.0.1","next":"2.0.0-4"},"versions":{"0.0.1":{"name":"redux-cirquit","version":"0.0.1","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/airtoxin/redux-cirquit.git"},"keywords":[],"author":{"name":"airtoxin","email":"airtoxin@icloud.com"},"license":"MIT","bugs":{"url":"https://github.com/airtoxin/redux-cirquit/issues"},"homepage":"https://github.com/airtoxin/redux-cirquit#readme","gitHead":"b2e04ac51577f0ee7becc1f5595aa805b7adbdbf","_id":"redux-cirquit@0.0.1","_npmVersion":"5.7.1","_nodeVersion":"8.9.1","_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"dist":{"integrity":"sha512-jQGYUkAKso5QGUJ2LZge423Noi5NguwtwUOLRzU4OKjKL3OqpGGOaT2efSi4dmGucKu70V6gV6TUBkP0rsYpdg==","shasum":"94639c2615c6a6670f2d068b7ddf0cf4218bce02","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-0.0.1.tgz","fileCount":3,"unpackedSize":1590,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF7RU1N3LLwphfeLHHl4w2iuyViL1M/QmZ4JG5NXXi62AiAhz+CByJHk4wR0kM/k/EDdRZZJc24z387Vl2k9o2BqAw=="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_0.0.1_1521753295289_0.6252920990306174"},"_hasShrinkwrap":false},"1.1.0-pre.0":{"name":"redux-cirquit","version":"1.1.0-pre.0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","directories":{"lib":"dist"},"scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","build":"tsc","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"git+https://github.com/airtoxin/redux-cirquit.git"},"keywords":[],"author":{"name":"airtoxin"},"license":"MIT","bugs":{"url":"https://github.com/airtoxin/redux-cirquit/issues"},"homepage":"https://github.com/airtoxin/redux-cirquit#readme","devDependencies":{"@types/jest":"^22.2.2","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","ts-jest":"^22.4.2","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"gitHead":"cd00eeb3134b2c8eb38163e6a002fd17e202b252","_id":"redux-cirquit@1.1.0-pre.0","_npmVersion":"5.7.1","_nodeVersion":"8.9.1","_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"dist":{"integrity":"sha512-kn3stMhI1DrpTdCl/OZeFwuobSWyD3Pb0Nl70JwTAf62FgD9okPhqefemlQmEkLdfa/a55qfTvbA82j9CpUD9A==","shasum":"3fa98ccc4c59f0f81d2bf88de4492e86e0aeca8c","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.1.0-pre.0.tgz","fileCount":24,"unpackedSize":151071,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBy8JFqiQf8MyNFeziWvabWiRp6A8NVb2TC+3MJJN/okAiBtOCZvDvDkl3cwzIKIJ6KyO0It5alAj6NBynspOY+xig=="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.1.0-pre.0_1522165899237_0.011225449831290701"},"_hasShrinkwrap":false},"1.1.0":{"name":"redux-cirquit","version":"1.1.0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","directories":{"lib":"dist"},"scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","build":"tsc","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"git+https://github.com/airtoxin/redux-cirquit.git"},"keywords":[],"author":{"name":"airtoxin"},"license":"MIT","bugs":{"url":"https://github.com/airtoxin/redux-cirquit/issues"},"homepage":"https://github.com/airtoxin/redux-cirquit#readme","devDependencies":{"@types/jest":"^22.2.2","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","ts-jest":"^22.4.2","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"gitHead":"f97d4ddb484a8c63432f74961967ea4fe031d48a","_id":"redux-cirquit@1.1.0","_npmVersion":"5.7.1","_nodeVersion":"8.9.1","_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"dist":{"integrity":"sha512-TwJ8JXtiiDzUWKHirfMQ1qB0TOeEFSLeWryTZJaUKFQ8lHl9WthNO5zdp/Av/ZiX6I4i51yKywHIr+Ir8wAV7w==","shasum":"e7bb1d43ce7e049449a01cd223f80cc2b0c6a212","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.1.0.tgz","fileCount":24,"unpackedSize":150851,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUFiUGUxz0FKPyIeJRblyD5kXSGWH3DvnMVMiWOlQKVQIgWQFmJpGXYZUNUDDDKsCKJJedYfGsqwpa06L8V9ap3tI="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.1.0_1522166557249_0.4626246004419212"},"_hasShrinkwrap":false},"1.2.0":{"name":"redux-cirquit","version":"1.2.0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","directories":{"lib":"dist"},"scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","build":"tsc","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"git+https://github.com/airtoxin/redux-cirquit.git"},"keywords":[],"author":{"name":"airtoxin"},"license":"MIT","bugs":{"url":"https://github.com/airtoxin/redux-cirquit/issues"},"homepage":"https://github.com/airtoxin/redux-cirquit#readme","devDependencies":{"@types/jest":"^22.2.2","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","ts-jest":"^22.4.2","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"gitHead":"4c88d0cea2a19ec5c2781cd8f87d4d3ca8236383","_id":"redux-cirquit@1.2.0","_npmVersion":"5.7.1","_nodeVersion":"8.9.1","_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"dist":{"integrity":"sha512-KGKO3Ol3ObzukdukTit5cZwo6hCNf2V4kQlA7qhdf77x/SpS9y3MeoFa7l6DXbEiTPqpGRc6w6WjOK/7hGlpwg==","shasum":"d4169206cc7cf00d942084ae109876e9eab08b91","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.2.0.tgz","fileCount":27,"unpackedSize":191895,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtMSAqgZwPx4wFACdml+4yx47LzwH2LhIjUvzBOrR1EwIgUJaUTbu2xc4DbPOeG1Zt2jagyxcVITBvlRHUl5VfUVY="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.2.0_1522423758908_0.16347342899799333"},"_hasShrinkwrap":false},"1.3.0-alpha.0":{"name":"redux-cirquit","version":"1.3.0-alpha.0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","directories":{"lib":"dist"},"scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","build":"tsc","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"git+https://github.com/airtoxin/redux-cirquit.git"},"keywords":[],"author":{"name":"airtoxin"},"license":"MIT","bugs":{"url":"https://github.com/airtoxin/redux-cirquit/issues"},"homepage":"https://github.com/airtoxin/redux-cirquit#readme","devDependencies":{"@types/jest":"^22.2.2","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"gitHead":"70465ecad4cbfc5210726a0392a11bba85f1516c","_id":"redux-cirquit@1.3.0-alpha.0","_npmVersion":"5.7.1","_nodeVersion":"8.9.1","_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"dist":{"integrity":"sha512-0HPbhzq+uk1WQFPhhpZWzKfCdoi0u76rAGEDTNyRTgBmu8Jke3yOpFal50dXnti21BJN/6Thobc1IMnBefSAOQ==","shasum":"a102cd49faef4d7c3d3eb4c3061b5fed63150d15","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.3.0-alpha.0.tgz","fileCount":28,"unpackedSize":204571,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBrWoSE30M6R3lVs7+SoCjYr2asQOwIKk0caWHGFP6XxAiEAhmnbCOTbq1Gcsf8lze54jYYB+I9Y2fob7q7540BbpbA="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.3.0-alpha.0_1522539250995_0.5527562404584454"},"_hasShrinkwrap":false},"1.3.0":{"name":"redux-cirquit","version":"1.3.0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","directories":{"lib":"dist"},"scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","build":"tsc","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"git+https://github.com/airtoxin/redux-cirquit.git"},"keywords":[],"author":{"name":"airtoxin"},"license":"MIT","bugs":{"url":"https://github.com/airtoxin/redux-cirquit/issues"},"homepage":"https://github.com/airtoxin/redux-cirquit#readme","devDependencies":{"@types/jest":"^22.2.2","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"gitHead":"09487fadf52ed7910356c4b92d296568f777ffb3","_id":"redux-cirquit@1.3.0","_npmVersion":"5.7.1","_nodeVersion":"8.9.1","_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"dist":{"integrity":"sha512-/+HM0o1CLkBcdIXAiqWM2gv9jV5FRmSGxwiCK3pXR3rgPX2lz5y/ur5vjzuZF9sC8oEr5EKG+2mtMFzgGDjMdQ==","shasum":"913e8926ba70c5904fddbb52f7e0c8bff9c87a67","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.3.0.tgz","fileCount":28,"unpackedSize":204252,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBEGi1haK34VceMYz1YH2yifYUo7rGAh/89m0bV+JI0QIgOJ41/XuK/Wrn42hXodyn7YMr916/0Qhu8Kc389aO+ks="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.3.0_1522541420170_0.33286824154649963"},"_hasShrinkwrap":false},"1.4.0-0":{"name":"redux-cirquit","version":"1.4.0-0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"git+https://github.com/airtoxin/redux-cirquit.git"},"keywords":[],"author":{"name":"airtoxin"},"license":"MIT","bugs":{"url":"https://github.com/airtoxin/redux-cirquit/issues"},"homepage":"https://github.com/airtoxin/redux-cirquit#readme","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"readmeFilename":"README.md","readme":"# redux-cirquit [![Build Status](https://travis-ci.org/airtoxin/redux-cirquit.svg?branch=master)](https://travis-ci.org/airtoxin/redux-cirquit)\n\n__Realize command based short-circuiting redux.__\n\n<img src=\"/logo.png\" width=\"250px\" />\n\n## Concept\n\nThe aim of redux-cirquit is to realize command based application system on redux ecosystem.\n\nRedux is an implementation of Flux based on __event based__ application system.\nIts concept is good but bit tired,\nbecause event system requires to define event elements separately each other (eventName, eventPublisher, eventSubscriber) to keep loose-coupling between eventPublisher and eventSubscriber.\n\nEvent based application system is suitable for large sized application, but overkill for small-medium sized application.\nAnd we almost define its event elements tight-coupled.\nTight-couped event system is nearly equals to __command based__ application system.\nIf you use redux with command based application system, there are no reason to define event elements separately (actionTypes, action, actionCreator and reducer).\n\nCommand based application system is much simpler than event based.\nThere is only exists \"command\", so your actionCreator (with dispatch) is called as command.\nThis is a redux-cirquit.\n\n```js\nconst increment = amount => createCirquitAction(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n// execute increment command\nstore.dispatch(increment(1));\n```\n\n## Install\n\n`$ npm install redux-cirquit` or `$ yarn add redux-cirquit`\n\n## Usage\n\n```js\nimport { createStore } from \"redux\";\nimport { createCirquitReducer, createCirquitAction } from \"redux-cirquit\";\n\nconst initialState = {\n  counter: {\n    count: 0\n  }\n};\nconst cirquitReducer = createCirquitReducer(initialState);\nconst store = createStore(cirquitReducer);\n\nconst increment = amount => createCirquitAction(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n\nstore.dispatch(increment(1)); // state is { counter: { count: 1 } }\n```\n\nwith combineReducers\n\n```js\nconst store = createStore(combineReducers({\n  counter: createCirquitReducer(initialCounterState, { namespace: \"counter\" }),\n  user: createCirquitReducer(initialUserState, { namespace: \"user\" })\n}));\n\nconst increment = amount => createCirquitAction(state => ({\n  ...state,\n  count: state.count + amount\n}), { namespace: \"counter\" });\n\nstore.dispatch(increment(1));\n```\n\n[Full example](https://github.com/airtoxin/redux-cirquit-example)\n\n## API\n\n### export createCirquitReducer\\<State\\>(initialState: State, options?: { namespace?: string }): Redux.Reducer\\<State\\>\n\nCreates redux-cirquit's reducer that manages your application's state.  \nIf you want to split reducer using `combineReducers`, you must specify reducer name by `namespace` option.\n\n### export createCirquitAction\\<State\\>(reducer: (state: State) => State, options?: CirquitActionOptions }): Redux.Action\n\nCreates basic redux action to reduce you application's state.  \n\n#### CirquitActionOptions = { namespace?: string, meta?: { reducerName?: string, ...anyProps } }\n\nIf you use splited reducer, must set same `namespace` of related reducer to this action.  \n`meta` properties is almostly pass through to returned action's meta property except `meta.reducerName` property, so you can define any debugging informations in `meta`.  \n`meta.reducerName` is optional property to define action name.\nIf not specify `meta.reducerName`, [function name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) or \"anonymous\" is used.\n\n## Articles\n\n[それでもやっぱり redux は面倒くさい](https://qiita.com/airtoxin/items/1632d523ad95adf6f3fe) (Japanese)\n\n## License\n\nMIT\n","licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@1.4.0-0","dist":{"shasum":"00f7efc8f1991f6d7f092ea4629cbeebe8b46bce","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.4.0-0.tgz","fileCount":33,"unpackedSize":72288,"integrity":"sha512-1/FMvnTIpunn9HeJK20kanJKao/SIk+hC+iHS5+lqPKrWu2BLhDtYUQLMmsoWoOKrE/xMUsHsx2IYOG+dF/y7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHqevjLl+K7+Wi0o0Sskt6uITZJPvufLBYPw5sI0cjMjAiBkdAoot1YtICJrkerC9mV+UyKCZf/GNhm1m5DRbTSJ3w=="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.4.0-0_1522937772632_0.9286352166299763"},"_hasShrinkwrap":false},"1.4.0-1":{"name":"redux-cirquit","version":"1.4.0-1","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"git+https://github.com/airtoxin/redux-cirquit.git"},"keywords":[],"author":{"name":"airtoxin"},"license":"MIT","bugs":{"url":"https://github.com/airtoxin/redux-cirquit/issues"},"homepage":"https://github.com/airtoxin/redux-cirquit#readme","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"readmeFilename":"README.md","readme":"# redux-cirquit [![Build Status](https://travis-ci.org/airtoxin/redux-cirquit.svg?branch=master)](https://travis-ci.org/airtoxin/redux-cirquit)\n\n__Realize command based short-circuiting redux.__\n\n<img src=\"/logo.png\" width=\"250px\" />\n\n## Concept\n\nThe aim of redux-cirquit is to realize command based application system on redux ecosystem.\n\nRedux is an implementation of Flux based on __event based__ application system.\nIts concept is good but bit tired,\nbecause event system requires to define event elements separately each other (eventName, eventPublisher, eventSubscriber) to keep loose-coupling between eventPublisher and eventSubscriber.\n\nEvent based application system is suitable for large sized application, but overkill for small-medium sized application.\nAnd we almost define its event elements tight-coupled.\nTight-couped event system is nearly equals to __command based__ application system.\nIf you use redux with command based application system, there are no reason to define event elements separately (actionTypes, action, actionCreator and reducer).\n\nCommand based application system is much simpler than event based.\nThere is only exists \"command\", so your actionCreator (with dispatch) is called as command.\nThis is a redux-cirquit.\n\n```js\nconst increment = amount => createCirquitAction(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n// execute increment command\nstore.dispatch(increment(1));\n```\n\n## Install\n\n`$ npm install redux-cirquit` or `$ yarn add redux-cirquit`\n\n## Usage\n\n```js\nimport { createStore } from \"redux\";\nimport { createCirquitReducer, createCirquitAction } from \"redux-cirquit\";\n\nconst initialState = {\n  counter: {\n    count: 0\n  }\n};\nconst cirquitReducer = createCirquitReducer(initialState);\nconst store = createStore(cirquitReducer);\n\nconst increment = amount => createCirquitAction(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n\nstore.dispatch(increment(1)); // state is { counter: { count: 1 } }\n```\n\nwith combineReducers\n\n```js\nconst store = createStore(combineReducers({\n  counter: createCirquitReducer(initialCounterState, { namespace: \"counter\" }),\n  user: createCirquitReducer(initialUserState, { namespace: \"user\" })\n}));\n\nconst increment = amount => createCirquitAction(state => ({\n  ...state,\n  count: state.count + amount\n}), { namespace: \"counter\" });\n\nstore.dispatch(increment(1));\n```\n\n[Full example](https://github.com/airtoxin/redux-cirquit-example)\n\n## API\n\n### export createCirquitReducer\\<State\\>(initialState: State, options?: { namespace?: string }): Redux.Reducer\\<State\\>\n\nCreates redux-cirquit's reducer that manages your application's state.  \nIf you want to split reducer using `combineReducers`, you must specify reducer name by `namespace` option.\n\n### export createCirquitAction\\<State\\>(reducer: (state: State) => State, options?: CirquitActionOptions }): Redux.Action\n\nCreates basic redux action to reduce you application's state.  \n\n#### CirquitActionOptions = { namespace?: string, meta?: { reducerName?: string, ...anyProps } }\n\nIf you use splited reducer, must set same `namespace` of related reducer to this action.  \n`meta` properties is almostly pass through to returned action's meta property except `meta.reducerName` property, so you can define any debugging informations in `meta`.  \n`meta.reducerName` is optional property to define action name.\nIf not specify `meta.reducerName`, [function name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) or \"anonymous\" is used.\n\n## Articles\n\n[それでもやっぱり redux は面倒くさい](https://qiita.com/airtoxin/items/1632d523ad95adf6f3fe) (Japanese)\n\n## License\n\nMIT\n","licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@1.4.0-1","dist":{"shasum":"fc0c92c8a7fee950eafc295dce32950ba25b2b8f","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.4.0-1.tgz","fileCount":36,"unpackedSize":80420,"integrity":"sha512-4hOciD4lt+VR0IKchm4FNutrSZkBuDFoQR1xFB8GrMGMDR0Ixcf3kkyVOCUvzrJaDRqjuosInOVyyDbitfGq2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqZZHxqJcfxIhSM9Xyt7KzO85zB5HTuZb7nbtNyxZEtQIgV2kIOi75dChkiK6BwG3BmjCy+NupaBpGiyMOOcOkWvo="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.4.0-1_1522938297998_0.9928886726004666"},"_hasShrinkwrap":false},"1.4.0":{"name":"redux-cirquit","version":"1.4.0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"git+https://github.com/airtoxin/redux-cirquit.git"},"keywords":[],"author":{"name":"airtoxin"},"license":"MIT","bugs":{"url":"https://github.com/airtoxin/redux-cirquit/issues"},"homepage":"https://github.com/airtoxin/redux-cirquit#readme","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@1.4.0","dist":{"shasum":"26566529cbf15d337d1b9b7235426c1a962086f5","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.4.0.tgz","fileCount":36,"unpackedSize":79709,"integrity":"sha512-cvYKM8PvjXbkqiNljYTzjvjVPOzWsGZM2CisObJ0AhVA79/gvK5Mqhd7uFFSnedNastEip9f+BwA9lAf/BMLEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBwwcSdZOp3m4kN7HZSvpMjzQ9Ql2V7hXK8QYlWaT9hoAiEAyqWepwbtTyun2uO45cUDwyBbfPNZZHF2YtZwic6Tc/Q="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.4.0_1522939016094_0.4798345163094222"},"_hasShrinkwrap":false},"1.4.1-0":{"name":"redux-cirquit","version":"1.4.1-0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"keywords":["redux","flux","react","state"],"author":{"name":"airtoxin"},"files":["dist"],"license":"MIT","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"readmeFilename":"README.md","readme":"# redux-cirquit [![Build Status](https://travis-ci.org/airtoxin/redux-cirquit.svg?branch=master)](https://travis-ci.org/airtoxin/redux-cirquit)\n\n__Realize command based short-circuiting redux.__\n\n<img src=\"/logo.png\" width=\"250px\" />\n\n## Concept\n\nThe aim of redux-cirquit is to realize command based application system on redux ecosystem.\n\nRedux is an implementation of Flux based on __event based__ application system.\nIts concept is good but bit tired,\nbecause event system requires to define event elements separately each other (eventName, eventPublisher, eventSubscriber) to keep loose-coupling between eventPublisher and eventSubscriber.\n\nEvent based application system is suitable for large sized application, but overkill for small-medium sized application.\nAnd we almost define its event elements tight-coupled.\nTight-couped event system is nearly equals to __command based__ application system.\nIf you use redux with command based application system, there are no reason to define event elements separately (actionTypes, action, actionCreator and reducer).\n\nCommand based application system is much simpler than event based.\nThere is only exists \"command\", so your actionCreator (with dispatch) is called as command.\nThis is a redux-cirquit.\n\n```js\nconst increment = amount => createCirquitAction(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n// execute increment command\nstore.dispatch(increment(1));\n```\n\n## Install\n\n`$ npm install redux-cirquit` or `$ yarn add redux-cirquit`\n\n## Usage\n\n```js\nimport { createStore } from \"redux\";\nimport { createCirquitReducer, createCirquitAction } from \"redux-cirquit\";\n\nconst initialState = {\n  counter: {\n    count: 0\n  }\n};\nconst cirquitReducer = createCirquitReducer(initialState);\nconst store = createStore(cirquitReducer);\n\nconst increment = amount => createCirquitAction(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n\nstore.dispatch(increment(1)); // state is { counter: { count: 1 } }\n```\n\nwith combineReducers\n\n```js\nconst store = createStore(combineReducers({\n  counter: createCirquitReducer(initialCounterState, { namespace: \"counter\" }),\n  user: createCirquitReducer(initialUserState, { namespace: \"user\" })\n}));\n\nconst increment = amount => createCirquitAction(state => ({\n  ...state,\n  count: state.count + amount\n}), { namespace: \"counter\" });\n\nstore.dispatch(increment(1));\n```\n\n[Full example](https://github.com/airtoxin/redux-cirquit-example)\n\n## API\n\n### export createCirquitReducer\\<State\\>(initialState: State, options?: { namespace?: string }): Redux.Reducer\\<State\\>\n\nCreates redux-cirquit's reducer that manages your application's state.  \nIf you want to split reducer using `combineReducers`, you must specify reducer name by `namespace` option.\n\n### export createCirquitAction\\<State\\>(reducer: (state: State) => State, options?: CirquitActionOptions }): Redux.Action\n\nCreates basic redux action to reduce you application's state.  \n\n#### CirquitActionOptions = { namespace?: string, meta?: { reducerName?: string, ...anyProps } }\n\nIf you use splited reducer, must set same `namespace` of related reducer to this action.  \n`meta` properties is almostly pass through to returned action's meta property except `meta.reducerName` property, so you can define any debugging informations in `meta`.  \n`meta.reducerName` is optional property to define action name.\nIf not specify `meta.reducerName`, [function name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) or \"anonymous\" is used.\n\n## Articles\n\n[それでもやっぱり redux は面倒くさい](https://qiita.com/airtoxin/items/1632d523ad95adf6f3fe) (Japanese)\n\n## License\n\nMIT\n","licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@1.4.1-0","dist":{"shasum":"bdea82c53fb474e43bf690004249d08c1e85abe5","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.4.1-0.tgz","fileCount":11,"unpackedSize":16043,"integrity":"sha512-SEaIOZspVrDxGkuKSv9rFsgek6tgedi3gAdzvz7XHJEggC8Qt/UFkMkAwX4V8x3efxP8D8xPn54YBLvF5xh9Jw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEr9ktj6iuF8AtDMJEpPKf9RSVLvWZ6ttpE0xLyQp2/EAiEAgtGW8n5Mr1Srn+WZE0KmuskeyY+Nb8QAW6TjjXAk0Ns="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.4.1-0_1523073809704_0.628378991000158"},"_hasShrinkwrap":false},"1.4.1":{"name":"redux-cirquit","version":"1.4.1","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"keywords":["redux","flux","react","state"],"author":{"name":"airtoxin"},"files":["dist"],"license":"MIT","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@1.4.1","dist":{"shasum":"996db8e57fac89387f7577727bdca581dbb282ac","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-1.4.1.tgz","fileCount":11,"unpackedSize":16041,"integrity":"sha512-2Iusfdd/tGkfqyiOwA3l/vDptoi7T3RBqv6JqCjhVXasiLjSR8++aC84W+FxzHDs49gp3GsjeXwHn+hl7feB6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUPBBaNTmiJFbTb816u3IpxYFQxnueLaqLtAliIsrTTwIgBTpe8AtzDqCB66ZGqoA16FsqoPbF6tR0J+3PFMnrubU="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_1.4.1_1523074388705_0.829252580360833"},"_hasShrinkwrap":false},"2.0.0-0":{"name":"redux-cirquit","version":"2.0.0-0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"keywords":["redux","flux","react","state"],"author":{"name":"airtoxin"},"files":["dist"],"license":"MIT","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"readmeFilename":"README.md","readme":"# redux-cirquit [![Build Status](https://travis-ci.org/airtoxin/redux-cirquit.svg?branch=master)](https://travis-ci.org/airtoxin/redux-cirquit)\n\n__To realize operation based short-circuiting redux.__\n\n<img src=\"/logo.png\" width=\"250px\" />\n\n## Concept\n\nThe aim of redux-cirquit is to realize operation based application system on redux ecosystem.\n\nRedux is an implementation of Flux based on __event based__ application system.\nIts concept is good but bit tired,\nbecause event system requires to define event elements separately each other (EventName, EventPublisher, EventSubscriber) to keep loose-coupling between event publisher and subscriber.\n\nEvent based application system is suitable for gigantic large sized application, but overkill for small or medium sized application.\nAnd we almost define its event elements (event publisher and subscriber) tight-coupled.\nTight-couped event system is nearly equals to __operation based__ application system.\nIf you use redux with operation based application system, there are no reason to define event elements separately (ActionTypes, Action, ActionCreator and Reducer).\n\nOperation based application system is much simpler than event based.\nThere is only exists \"Operation\", so your ActionCreator (with dispatch) is called as operation.\nThis is a redux-cirquit.\n\n```js\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n// execute increment operation\nstore.dispatch(increment(1));\n```\n\n## Install\n\n`$ npm install redux-cirquit` or `$ yarn add redux-cirquit`\n\n## Usage\n\n```js\nimport { createStore } from \"redux\";\nimport { createCirquitReducer, createOperation } from \"redux-cirquit\";\n\nconst initialState = {\n  counter: {\n    count: 0\n  }\n};\nconst cirquitReducer = createCirquitReducer(initialState);\nconst store = createStore(cirquitReducer);\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n\nstore.dispatch(increment(1)); // state is { counter: { count: 1 } }\n```\n\nwith combineReducers\n\n```js\nconst store = createStore(combineReducers({\n  counter: createCirquitReducer(initialCounterState, { namespace: \"counter\" }),\n  user: createCirquitReducer(initialUserState, { namespace: \"user\" })\n}));\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  count: state.count + amount\n}), { namespace: \"counter\" });\n\nstore.dispatch(increment(1));\n```\n\n[Full example](https://github.com/airtoxin/redux-cirquit-example)\n\n## API\n\n### export createCirquitReducer\\<State\\>(initialState: State, options?: { namespace?: string }): Redux.Reducer\\<State\\>\n\nCreates redux-cirquit's reducer.  \nIf you want to split reducer using `combineReducers`, you should specify `namespace` in option.\n\n### export createOperation\\<State\\>(reducer: (s: State) => State, options?: OperationOptions }): Redux.Action\n\nCreates operation to reduce state.  \nThe operation is actually redux's action.\n\n#### OperationOptions = { namespace?: string, meta?: { reducerName?: string, ...anyProps } }\n\nIf you use splitted reducer, you should set same `namespace` of reducer related to this action.  \n`meta` properties is almostly pass through to returned action's meta property except `meta.reducerName` property, so you can define any debugging informations in `meta`.  \n`meta.reducerName` is optional property to define action name.\nIf not specify `meta.reducerName`, [function name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) or \"anonymous\" is used.\n\n### getActionType(namespace: string): string\n\nGet action type used in redux-cirquit internally.\n\n## Articles\n\n[それでもやっぱり redux は面倒くさい](https://qiita.com/airtoxin/items/1632d523ad95adf6f3fe) (Japanese)\n\n## [Changelog](/CHANGELOG.md)\n\n## License\n\nMIT\n","licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@2.0.0-0","dist":{"shasum":"da1649f42aee0510399a2dcfb86f8737d3d09f86","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-2.0.0-0.tgz","fileCount":11,"unpackedSize":16337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa10qMCRA9TVsSAnZWagAAF/8P/ik1nEU0T88tdPS8mXNK\n/30wzQd6/rTGTop/rPK7Rm4Dhb5P5go3QzDGpbCKIJ1Uk2Yij+0rZh8CuRSz\nw36cb3Bmik9UmnnOQxYd1nfME555w4GbDZtIzBLvzdaElJ+OJ5bFpUznHeEV\nxDiY3b5pLMpHEc7BzvHNJwSdmfkW17WzE8Foj+ET+5FcfSfY483AcdSCUXjS\nkWAqgSTA54RSk+fvahaHc7sY3qDIX51vQYPyfBACPE3SFOyKuKBkOyK/JQKX\nhCXhntG8bfmE5o9WZh6NrNnhafvAorXX1H5EcLP0/tGUWWyhzl1rvQ90UbA1\nf1k7TnOA6AkZ08olTJ5MqhqvTMNJUYzA3D6W2WD6O7P14TXLNPLbAhICxxky\nKVOipy9VJHIkMvzU1DhIsHzB0SuPwo/LVA6Ls+a4BHpeTv+j+PoupGbw03nZ\nj/nG7+YTGdtunG0/9ddTmYdx5CfQyRcx5yO1Krgmn52f8B5Lfli48nyvZJan\nunYakyI1EydUjuVdxTsynbPSR0zGg8TYQK6U5azBOG6dy+uG0wlYAQWfk+WV\n31bYb1pAWNUUTj1UqScWOMSc7hQkgnZTplbjs2n64xI7zJE5SOnFguLkVrAH\nmy2Zc82pxRlle4yfEofZVLWyA6GVb55KTafKmUViTzSsyp7Vj05iQhi9aGWv\n1KT+\r\n=CJ1I\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-cDmQ1CDvu2SWmHDgk0NT/7yvG71ZDOiDJI2ZfeZPKwI/dxNfZvE5oCOsI1njnQ8sftSI8ZN0LfWbroc3fGY9PA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9eIG4dqgeSTiFWEJFgk69NfcD3LD8UlAmOTy/1ncF1wIhAOnb/4phJ9rYig1ykinnDX3tRQ0Zh3/EG4mHKc18oZMw"}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_2.0.0-0_1524058763772_0.43689059761783344"},"_hasShrinkwrap":false},"2.0.0-1":{"name":"redux-cirquit","version":"2.0.0-1","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"keywords":["redux","flux","react","state"],"author":{"name":"airtoxin"},"files":["dist"],"license":"MIT","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"readmeFilename":"README.md","readme":"# redux-cirquit [![Build Status](https://travis-ci.org/airtoxin/redux-cirquit.svg?branch=master)](https://travis-ci.org/airtoxin/redux-cirquit)\n\n__To realize operation based short-circuiting redux.__\n\n<img src=\"/logo.png\" width=\"250px\" />\n\n## Concept\n\nThe aim of redux-cirquit is to realize operation based application system on redux ecosystem.\n\nRedux is an implementation of Flux based on __event based__ application system.\nIts concept is good but bit tired,\nbecause event system requires to define event elements separately each other (EventName, EventPublisher, EventSubscriber) to keep loose-coupling between event publisher and subscriber.\n\nEvent based application system is suitable for gigantic large sized application, but overkill for small or medium sized application.\nAnd we almost define its event elements (event publisher and subscriber) tight-coupled.\nTight-couped event system is nearly equals to __operation based__ application system.\nIf you use redux with operation based application system, there are no reason to define event elements separately (ActionTypes, Action, ActionCreator and Reducer).\n\nOperation based application system is much simpler than event based.\nThere is only exists \"Operation\", so your ActionCreator (with dispatch) is called as operation.\nThis is a redux-cirquit.\n\n```js\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n// execute increment operation\nstore.dispatch(increment(1));\n```\n\n## Install\n\n`$ npm install redux-cirquit` or `$ yarn add redux-cirquit`\n\n## Usage\n\n```js\nimport { createStore } from \"redux\";\nimport { createCirquitReducer, createOperation } from \"redux-cirquit\";\n\nconst initialState = {\n  counter: {\n    count: 0\n  }\n};\nconst cirquitReducer = createCirquitReducer(initialState);\nconst store = createStore(cirquitReducer);\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n\nstore.dispatch(increment(1)); // state is { counter: { count: 1 } }\n```\n\nwith combineReducers\n\n```js\nconst store = createStore(combineReducers({\n  counter: createCirquitReducer(initialCounterState, { namespace: \"counter\" }),\n  user: createCirquitReducer(initialUserState, { namespace: \"user\" })\n}));\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  count: state.count + amount\n}), { namespace: \"counter\" });\n\nstore.dispatch(increment(1));\n```\n\n[Full example](https://github.com/airtoxin/redux-cirquit-example)\n\n## API\n\n### export createCirquitReducer\\<State\\>(initialState: State, options?: { namespace?: string }): Redux.Reducer\\<State\\>\n\nCreates redux-cirquit's reducer.  \nIf you want to split reducer using `combineReducers`, you should specify `namespace` in option.\n\n### export createOperation\\<State\\>(reducer: (s: State) => State, options?: OperationOptions }): Redux.Action\n\nCreates operation to reduce state.  \nThe operation is actually redux's action.\n\n#### OperationOptions = { namespace?: string, meta?: { reducerName?: string, ...anyProps } }\n\nIf you use splitted reducer, you should set same `namespace` of reducer related to this action.  \n`meta` properties is almostly pass through to returned action's meta property except `meta.reducerName` property, so you can define any debugging informations in `meta`.  \n`meta.reducerName` is optional property to define action name.\nIf not specify `meta.reducerName`, [function name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) or \"anonymous\" is used.\n\n### getActionType(namespace: string): string\n\nGet action type used in redux-cirquit internally.\n\n## Articles\n\n[それでもやっぱり redux は面倒くさい](https://qiita.com/airtoxin/items/1632d523ad95adf6f3fe) (Japanese)\n\n## [Changelog](/CHANGELOG.md)\n\n## License\n\nMIT\n","licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@2.0.0-1","dist":{"shasum":"9b497d56b1c268513a0c8a781807e69828ee1a2a","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-2.0.0-1.tgz","fileCount":11,"unpackedSize":16337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa11o0CRA9TVsSAnZWagAAfWUP/00css/zB8Rn3KwZdR/D\n2PeAcDEmT0Nrk50Jf4Yv10qLdbc7sYiOLsrEbo0hxr8NKtUk42zMHolWcCzt\nUg2M6Ft0ooRR/9xZJXeg9q3N9JyJWg56O6aYIMy8k48KYgCHArgJKO52gSC/\nD4ASwy2fGVVZ62GvgVM+rSOUCHAOWAwK+B8MIMX1Vv+mOY6/nhlr2xphwLc+\npu8bxNlAm+ywl0KPi3FZeJ65zKOzT7zseISdxrLSSG9Duf7bc08xLfaB6LJk\nq9GaFa6OmPV19Y4s4RS9zMhyxxPT2qbGeHApgByaFRzR+mZGbY9EdkOehY/e\nvoGYf0xeHp4HUKJTqblJ+S1jCJ7U6hIGE/ohDtHEMMnLVRZA5G/BcJDR/oAV\nHf3qEw1g7I4NoXklK3T1rvYImlf8NVLu/5CLHgFE2cVCVd5qikwuDd6dy4Gx\nKylHCc/O6BTjkrFYb6m9fGtXkQMrlfHIJPk5WBLE5HfGvTopS5UexvWGv51u\nKV4dTe/IRIUPadMW+ZD7rfDZLkncrtmm6wMmgKFyvj2AmPf9z97ELQKlJNMG\noaNORMLlzqzCGXBbnB8t323BZmSQPXyYFBf/DrmsVbapQCQ8F4nb8fZBs5kW\nQ35lkem1tlF+ve7VqOfrNgPlOmNRbrTCObR5hawEukaRl1YRQHmJmEKFDqPQ\niiEo\r\n=5Xw4\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-kO8cjV7LJbJwGEOigvOmOJSWU2vhrU8xTw7ogMpAa5mJp9i6pe2i8dnLXP4IeVAuWW0E1YSdWHkelPY2urgqfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDH5KQrn2kPsRHeHlFlW5IsbXNny2uMkZ7unWoBGQWO2gIgIDwOBHIabQ1GPiVaJrcJuFlBBqniD7RgQFNwHWHOi4w="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_2.0.0-1_1524062772325_0.48609666659083417"},"_hasShrinkwrap":false},"2.0.0-2":{"name":"redux-cirquit","version":"2.0.0-2","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"keywords":["redux","flux","react","state"],"author":{"name":"airtoxin"},"files":["dist"],"license":"MIT","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"readmeFilename":"README.md","readme":"# redux-cirquit [![Build Status](https://travis-ci.org/airtoxin/redux-cirquit.svg?branch=master)](https://travis-ci.org/airtoxin/redux-cirquit)\n\n__To realize operation based short-circuiting redux.__\n\n<img src=\"/logo.png\" width=\"250px\" />\n\n## Concept\n\nThe aim of redux-cirquit is to realize operation based application system on redux ecosystem.\n\nRedux is an implementation of Flux based on __event based__ application system.\nIts concept is good but bit tired,\nbecause event system requires to define event elements separately each other (EventName, EventPublisher, EventSubscriber) to keep loose-coupling between event publisher and subscriber.\n\nEvent based application system is suitable for gigantic large sized application, but overkill for small or medium sized application.\nAnd we almost define its event elements (event publisher and subscriber) tight-coupled.\nTight-couped event system is nearly equals to __operation based__ application system.\nIf you use redux with operation based application system, there are no reason to define event elements separately (ActionTypes, Action, ActionCreator and Reducer).\n\nOperation based application system is much simpler than event based.\nThere is only exists \"Operation\", so your ActionCreator (with dispatch) is called as operation.\nThis is a redux-cirquit.\n\n```js\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n// execute increment operation\nstore.dispatch(increment(1));\n```\n\n## Install\n\n`$ npm install redux-cirquit` or `$ yarn add redux-cirquit`\n\n## Usage\n\n```js\nimport { createStore } from \"redux\";\nimport { createCirquitReducer, createOperation } from \"redux-cirquit\";\n\nconst initialState = {\n  counter: {\n    count: 0\n  }\n};\nconst cirquitReducer = createCirquitReducer(initialState);\nconst store = createStore(cirquitReducer);\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n\nstore.dispatch(increment(1)); // state is { counter: { count: 1 } }\n```\n\nwith combineReducers\n\n```js\nconst store = createStore(combineReducers({\n  counter: createCirquitReducer(initialCounterState, { namespace: \"counter\" }),\n  user: createCirquitReducer(initialUserState, { namespace: \"user\" })\n}));\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  count: state.count + amount\n}), { namespace: \"counter\" });\n\nstore.dispatch(increment(1));\n```\n\n[Full example](https://github.com/airtoxin/redux-cirquit-example)\n\n## API\n\n### export createCirquitReducer\\<State\\>(initialState: State, options?: { namespace?: string }): Redux.Reducer\\<State\\>\n\nCreates redux-cirquit's reducer.  \nIf you want to split reducer using `combineReducers`, you should specify `namespace` in option.\n\n### export createOperation\\<State\\>(reducer: (s: State) => State, options?: OperationOptions }): Redux.Action\n\nCreates operation to reduce state.  \nThe operation is actually redux's action.\n\n#### OperationOptions = { namespace?: string, meta?: { reducerName?: string, ...anyProps } }\n\nIf you use splitted reducer, you should set same `namespace` of reducer related to this action.  \n`meta` properties is almostly pass through to returned action's meta property except `meta.reducerName` property, so you can define any debugging informations in `meta`.  \n`meta.reducerName` is optional property to define action name.\nIf not specify `meta.reducerName`, [function name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) or \"anonymous\" is used.\n\n### getActionType(namespace: string): string\n\nGet action type used in redux-cirquit internally.\n\n## Articles\n\n[それでもやっぱり redux は面倒くさい](https://qiita.com/airtoxin/items/1632d523ad95adf6f3fe) (Japanese)\n\n## [Changelog](/CHANGELOG.md)\n\n## License\n\nMIT\n","licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@2.0.0-2","dist":{"shasum":"9ae95a5290c402a6de9bd35c3991b91b9b55329a","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-2.0.0-2.tgz","fileCount":11,"unpackedSize":16069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa11/5CRA9TVsSAnZWagAAFz0P/2ZQx8p+y2vHPEmwRlAi\n6J7fLJOX7qDNV09fWpw1FkaQZePDqcnmwmvFROuhUYKG7dJoidmP5y9fEUmU\nVehJkiDjw30bWSVSgWlgGogjkmmq3M1HiwdmQ+4vEuMYAK5/BpBQ222XdG4m\nBghyprYz3e+byNmWU7/6MH7DaFA9RxMG7xS8vwWfBa1vG7Rn78R16nvqG+RI\nGLBppvg/BWf1TnspnlCrKmDyGjs60cOmAOOD+zuBkbfsQuDWCOgCXXyrjKML\nt7t1/UgrlFE5IFTT5nyXaTnKDWDpxGvaJ/5FLzS9ImHxMjmRhntaDNRUBrBW\nuQG1JEXSfOtNZVLAhANoItIagkiW93t99CKSjUoCrlwbFG9/z4e96CiSbxqo\ncHpgoutTHx5w9WmDZY1OoSXMuLKyHO+xeH5QSwORB9xAFEPQsSIfgspI71OO\nYrSsNB0EJOz4Pa30gUhGv0MBEp8AJUL6+LCZT+bqeYFTKtWE0PIObvDXZoql\naY/zMFwtdJivlGHd22dkT9YyhFwRmmtMrkS5h9tms2r2PcmsPxNOJXT3ygBc\nw5OZglEkrGRSw7mCtKKI300JIwtGE3DCW1lqSEvDq2WArvOHwwV15BLNCOKC\n7dSkpF2YKZtuwCJ+oIppYT3/oqafotxZBwtvAROEHE7Gszc+Sm68KS/nlGiE\nPlzs\r\n=m60g\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-xwIrxQujlD7vEAsRpU5zmyeOuUGfnvfXtJKas6iuDtUQRQ++zeKqbs7s++3ENz2jd+ffECik4usb86N20u3OtA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWDM01FQ96bj74niCZzbyXSNIeRlXjtCi3kFeInQlLWQIhALpJodXFVmH/YT24J3jKOjoNd0xTt96UAv9Wv1rLmmgr"}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_2.0.0-2_1524064248976_0.4367291875603758"},"_hasShrinkwrap":false},"2.0.0-3":{"name":"redux-cirquit","version":"2.0.0-3","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"keywords":["redux","flux","react","state"],"author":{"name":"airtoxin"},"files":["dist"],"license":"MIT","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^3.7.2","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"readmeFilename":"README.md","readme":"# redux-cirquit [![Build Status](https://travis-ci.org/airtoxin/redux-cirquit.svg?branch=master)](https://travis-ci.org/airtoxin/redux-cirquit)\n\n__To realize operation based short-circuiting redux.__\n\n<img src=\"/logo.png\" width=\"250px\" />\n\n## Concept\n\nThe aim of redux-cirquit is to realize operation based application system on redux ecosystem.\n\nRedux is an implementation of Flux based on __event based__ application system.\nIts concept is good but bit tired,\nbecause event system requires to define event elements separately each other (EventName, EventPublisher, EventSubscriber) to keep loose-coupling between event publisher and subscriber.\n\nEvent based application system is suitable for gigantic large sized application, but overkill for small or medium sized application.\nAnd we almost define its event elements (event publisher and subscriber) tight-coupled.\nTight-couped event system is nearly equals to __operation based__ application system.\nIf you use redux with operation based application system, there are no reason to define event elements separately (ActionTypes, Action, ActionCreator and Reducer).\n\nOperation based application system is much simpler than event based.\nThere is only exists \"Operation\", so your ActionCreator (with dispatch) is called as operation.\nThis is a redux-cirquit.\n\n```js\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n// execute increment operation\nstore.dispatch(increment(1));\n```\n\n## Install\n\n`$ npm install redux-cirquit` or `$ yarn add redux-cirquit`\n\n## Usage\n\n```js\nimport { createStore } from \"redux\";\nimport { createCirquitReducer, createOperation } from \"redux-cirquit\";\n\nconst initialState = {\n  counter: {\n    count: 0\n  }\n};\nconst cirquitReducer = createCirquitReducer(initialState);\nconst store = createStore(cirquitReducer);\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n\nstore.dispatch(increment(1)); // state is { counter: { count: 1 } }\n```\n\nwith combineReducers\n\n```js\nconst store = createStore(combineReducers({\n  counter: createCirquitReducer(initialCounterState, { namespace: \"counter\" }),\n  user: createCirquitReducer(initialUserState, { namespace: \"user\" })\n}));\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  count: state.count + amount\n}), { namespace: \"counter\" });\n\nstore.dispatch(increment(1));\n```\n\n[Full example](https://github.com/airtoxin/redux-cirquit-example)\n\n## API\n\n### export createCirquitReducer\\<State\\>(initialState: State, options?: { namespace?: string }): Redux.Reducer\\<State\\>\n\nCreates redux-cirquit's reducer.  \nIf you want to split reducer using `combineReducers`, you should specify `namespace` in option.\n\n### export createOperation\\<State\\>(reducer: (s: State) => State, options?: OperationOptions }): Redux.Action\n\nCreates operation to reduce state.  \nThe operation is actually redux's action.\n\n#### OperationOptions = { namespace?: string, meta?: { reducerName?: string, ...anyProps } }\n\nIf you use splitted reducer, you should set same `namespace` of reducer related to this action.  \n`meta` properties is almostly pass through to returned action's meta property except `meta.reducerName` property, so you can define any debugging informations in `meta`.  \n`meta.reducerName` is optional property to define action name.\nIf not specify `meta.reducerName`, [function name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) or \"anonymous\" is used.\n\n### getActionType(namespace: string): string\n\nGet action type used in redux-cirquit internally.\n\n## Articles\n\n[それでもやっぱり redux は面倒くさい](https://qiita.com/airtoxin/items/1632d523ad95adf6f3fe) (Japanese)\n\n## [Changelog](/CHANGELOG.md)\n\n## License\n\nMIT\n","licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@2.0.0-3","dist":{"shasum":"192d2a66a3de4062a790c2e0b43a9d8239a435fb","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-2.0.0-3.tgz","fileCount":11,"unpackedSize":16815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa19XYCRA9TVsSAnZWagAABbMP/3BLj7qtkCMc+Ih5tHY5\nt30Jzwq+fG+8dMz+yISvcCp3IQMv7gtK2+Fb+NH+sDiNia64Y14VndNFfpEo\n8LDiveMtd8kDpDAM82CSdHgym3GDwi//aE2c8N8Nmpo28NafbOElK/owR11U\nGSjH02yKb53iNEEcfCmxS+sBf2Hh9ilfPezZCvM4SUXeZlyoUSIbS05XGpDJ\n5ZfOtlazIdmnQ1TRSK1nMTOqip+Gi2rV58mRwthSGHtEu3UtT/B5ijJNizqe\nsc0jiCk8jLSPlQ+5Jm7Lg8xKidJgavEtYrSKHy4SjUE1WzpEzNogUisXAF0M\nCs1jjD/LcwBGAPtUXr5PVM1vnyL8+YxG3Y79NVAeG6E2OxCxNaeBRUFKLUYl\nLlaxGbTwIkuwIYuFI0zTzcken2kbpOPHg8wfWCQuPD4j3IFnvSxPkg4AR07Z\nfm8syXAv8yYK9RMI9vxdwPww/Tge5YvFY+DJxWXbvS0bbsLl05ZKpYWoyrco\nzTSe73pkQXVVuHM6h9YtvuU4xT7qBPZw7Q2taFSc5o2wRBLlp4fsHZzCMpf6\nqdRYb/f7OZqNjLs5Qk2F4Rrker31I3GDf7siKIBo6xAxfN5t4k2GNrEtE3XT\nQRaXYV9QCwq69SD1JZosC/1gaBNcCGHExw6gsU0kbNP9Kn+wlwGLlLMLffkD\ndjOw\r\n=56Rt\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-WT96Yvb5q1f5yvZNbote3TpI7BiUzLBy0tr84/+CADwLUAgIq/r10UlW0pULYaYG0Q+GBawR64VazUKyscRPTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB3P3phUwfYtg9AgvtXZsUjO8cN3BQ7KI9vLb/0n2f1zAiAk4Aa/A4cc8mjGVc1dm6HuOsLxzV1ZqUP/yNZjWsueuQ=="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_2.0.0-3_1524094423444_0.18933533993227813"},"_hasShrinkwrap":false},"2.0.0-4":{"name":"redux-cirquit","version":"2.0.0-4","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"keywords":["redux","flux","react","state"],"author":{"name":"airtoxin"},"files":["dist"],"license":"MIT","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^4.0.0","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"readmeFilename":"README.md","readme":"# redux-cirquit [![Build Status](https://travis-ci.org/airtoxin/redux-cirquit.svg?branch=master)](https://travis-ci.org/airtoxin/redux-cirquit)\n\n__To realize operation based short-circuiting redux.__\n\n<img src=\"/logo.png\" width=\"250px\" />\n\n## Concept\n\nThe aim of redux-cirquit is to realize operation based application system on redux ecosystem.\n\nRedux is an implementation of Flux based on __event based__ application system.\nIts concept is good but bit tired,\nbecause event system requires to define event elements separately each other (EventName, EventPublisher, EventSubscriber) to keep loose-coupling between event publisher and subscriber.\n\nEvent based application system is suitable for gigantic large sized application, but overkill for small or medium sized application.\nAnd we almost define its event elements (event publisher and subscriber) tightly-coupled.\nTightly-couped event system is nearly equals to __operation based__ application system.\nIf you use redux with operation based application system, there are no reason to define event elements separately (ActionTypes, Action, ActionCreator and Reducer).\n\nOperation based application system is much simpler than event based.\nThere is only exists \"Operation\", so your ActionCreator (with dispatch) is called as operation.\nThis is a redux-cirquit.\n\n```js\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n// execute increment operation\nstore.dispatch(increment(1));\n```\n\n## Install\n\n`$ npm install redux-cirquit` or `$ yarn add redux-cirquit`\n\n## Usage\n\n```js\nimport { createStore } from \"redux\";\nimport { createCirquitReducer, createOperation } from \"redux-cirquit\";\n\nconst initialState = {\n  counter: {\n    count: 0\n  }\n};\nconst cirquitReducer = createCirquitReducer(initialState);\nconst store = createStore(cirquitReducer);\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n\nstore.dispatch(increment(1)); // state is { counter: { count: 1 } }\n```\n\nwith combineReducers\n\n```js\nconst store = createStore(combineReducers({\n  counter: createCirquitReducer(initialCounterState, { namespace: \"counter\" }),\n  user: createCirquitReducer(initialUserState, { namespace: \"user\" })\n}));\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  count: state.count + amount\n}), { namespace: \"counter\" });\n\nstore.dispatch(increment(1));\n```\n\n[Full example](https://github.com/airtoxin/redux-cirquit-example)\n\n## API\n\n### export createCirquitReducer\\<State\\>(initialState: State, options?: { namespace?: string }): Redux.Reducer\\<State\\>\n\nCreates redux-cirquit's reducer.  \nIf you want to split reducer using `combineReducers`, you should specify `namespace` in option.\n\n### export createOperation\\<State\\>(reducer: (s: State) => State, options?: OperationOptions }): Redux.Action\n\nCreates operation to reduce state.  \nThe operation is actually redux's action.\n\n#### OperationOptions = { namespace?: string, meta?: { reducerName?: string, ...anyProps } }\n\nIf you use splitted reducer, you should set same `namespace` of reducer related to this action.  \n`meta` properties is almostly pass through to returned action's meta property except `meta.reducerName` property, so you can define any debugging informations in `meta`.  \n`meta.reducerName` is optional property to define action name.\nIf not specify `meta.reducerName`, [function name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) or \"anonymous\" is used.\n\n### getActionType(namespace: string): string\n\nGet action type used in redux-cirquit internally.\n\n## Articles\n\n[それでもやっぱり redux は面倒くさい](https://qiita.com/airtoxin/items/1632d523ad95adf6f3fe) (Japanese)\n\n## [Changelog](/CHANGELOG.md)\n\n## License\n\nMIT\n","licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@2.0.0-4","dist":{"shasum":"3d1c4b11ba4ac31477e468e3aec1f6036d1b251e","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-2.0.0-4.tgz","fileCount":11,"unpackedSize":17104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2arXCRA9TVsSAnZWagAAs9sP/3izKCox90cqcWel/sew\nZC2BdqCSA9K2izDK9NS3vjXoNWY74RQQStiLp7qfGd7xKCiIF2UsORr/ZVEk\n+4P+2fGN/o8j0e1Ib/rq536bB03GKNyWUwMqLi4w91LjWvdibmgxyrCDZt0J\nT4/Z5TMQoUXBK/X5twP8cFpJbwS7Oi0+f6Id6fXMJbKfW0BAXVu8iSpwMq6j\nMqSerLMs2Yd6I0ZF8uwWsLFKpIYxgHqUSfOUN/eitdIY92jIWhC7BcEKjJ0k\nleQjvzFwsVzA7tf+W4sJYo7c2RIif39HucXvnzxqGVFa9DO58dd2rHEuJdJJ\nl9StMgWCZF4PDiBjDnExXTHUvhkoQdegVbc4em/FX1zIJ0p359S1dddz4awb\nFgcSNTIbsY22ibB1qD80ZMIpEF+SHZ7hAA9qcAERguYlp3EYdxGScK2XhG9a\nHeyyubGyNMlASUeNraTD7wWlXXSRnq7VkfdyQ9KVyNa4p9S9OUuxNhaEFmq8\nIquAEDU39kc6JYMX5UoLFATjeSXzxVa+sv+OdR9EJs/MCJX4QpQSstU3/1sG\nBvrcdZYRUArKgzsjj43hUaHBpaEtuMSXhuodoY2RliSJ2ndA4R2PAzXGlCfK\nxZCnF+3EFYwAXGRp4Ei/z4U6afrWD3lLD+PLGV7Ef1+KQmVJmhH8ruU8+PKk\nQL6h\r\n=FB+W\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-18B90YtYA4B8RIPoKwCRYqCzqTM10iaeokvoW00ms2Gnet6lqLuTH6pJhE1ZN8FBloqQTWsMiN0oVW/77Qhptg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD97cD01EzGYo3jEfi9TTMndEfIfwIx5DhoC6RPonJTWgIgc98KH/Byrzyek1qkn3QhgGoJ+PdnCscCOZLRVKpPiWo="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_2.0.0-4_1524214486657_0.7380821260708896"},"_hasShrinkwrap":false},"2.0.0":{"name":"redux-cirquit","version":"2.0.0","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"keywords":["redux","flux","react","state"],"author":{"name":"airtoxin"},"files":["dist"],"license":"MIT","devDependencies":{"@types/jest":"^22.2.2","flowgen":"^1.2.1","jest":"^22.4.3","npm-run-all":"^4.1.2","prettier":"^1.11.1","redux":"^4.0.0","rimraf":"^2.6.2","ts-jest":"^22.4.2","tslib":"^1.9.0","tslint":"^5.9.1","tslint-config-prettier":"^1.10.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.2"},"licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@2.0.0","dist":{"shasum":"825d8690389f54a39d89a998b0704acbbe943805","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-2.0.0.tgz","fileCount":11,"unpackedSize":17102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2a0tCRA9TVsSAnZWagAAfQQP/j4nNlhVOl732xeSslfJ\nlwbgRmXILSYjezLejASl7V7eg4cx5xC2YGQUjTIzzusAI/wIN1p/bD2oRxxw\nmIihRFJES4H49DEUEiJe2SjNtCApo5LNFo5oJdQJU/ajAfsRO5z0iOO0ssEO\ninZLcU1PBogmIafkwHFLYmZX0lXnvSfL1Y9ugVFiUoICww1L/R7R3GFBlEMK\nuiKvwqOwiOrbhjQ9kS1ZwbHZCeddI2q65Oa7kjk7eufu34HAsoM6ERveHKKv\nRCNPtAKIkVYQK7zel8z1XjTc13cnuxbIL1KC6Q52hfRrg4QfNGPLQ8C17Wpq\nLTMXASwpWI9teVcErUa1yo1HGtve3T6/kKNNMvF/4yubIoPKnkKwaokthG0L\nZCr8deAgn1wyE7BAyV5S6LebS4HaSu9ikZYcW+ecVjjyKGhS9QaRkQDeGm93\nljOg0Dr66bAyI40bjR8Qm8LUFq8b1tcGuF6LreRhYPwjdjM6pQzGPtSI+tzV\n/LUuEz3sStwKbFjs8CQXWZAlkQ/ct8qiFEZCS101Hf1TKlBwdahSuP+q4mk1\nQKY1suQaEzRmZ9DTC4nzhTXdgrX5BF2uUrbzvcAIg+rrezPlWQYjloGl1Ap8\nGrTzrDn8SCA+fsPUsb0Z7jFjRBuj/cJgwbGVhpIDv9XW64hx5f8Y7r7lDyYW\n9kBt\r\n=Vcuf\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-4QWLopxT8ndXzE32RJfLrLaA9mYg8fgqe4ucup2IRWfsgCrk5zKin7nPXeos2ITxboq5oBOUTU8MNcG9LyMSxg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxCYlOR4ilqf+aITd4HSfSNsdddv8raqN6mjEEQsZQCQIgLLrmjQCzztBpY5bGKW7D9eHfjcuFWy1tQjvIqeC0FkY="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_2.0.0_1524215084748_0.5629285271137923"},"_hasShrinkwrap":false},"2.0.1":{"name":"redux-cirquit","version":"2.0.1","description":"short-circuiting action -> reducer handling in redux.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"fmt":"prettier --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}' --write","clean":"rimraf dist","build":"npm-run-all --serial clean build:ts build:flow","build:ts":"tsc","build:flow":"flowgen --output-file dist/index.js.flow dist/index.d.ts","test":"npm-run-all --parallel test:*","test:unit":"jest --config jest.config.json","test:fmt":"prettier --list-different --parser typescript '{,!(node_modules|dist)/**/}*.ts{,x}'","test:compile":"tsc --noEmit","prepublish":"npm-run-all --serial test build"},"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"keywords":["redux","flux","react","state"],"author":{"name":"airtoxin"},"files":["dist"],"license":"MIT","devDependencies":{"@types/jest":"^22.2.3","flowgen":"^1.2.2","jest":"^22.4.4","npm-run-all":"^4.1.3","prettier":"^1.12.1","redux":"^4.0.0","rimraf":"^2.6.2","ts-jest":"^22.4.6","tslib":"^1.9.1","tslint":"^5.10.0","tslint-config-prettier":"^1.13.0","tslint-config-standard":"^7.0.0","tslint-plugin-prettier":"^1.3.0","typescript":"^2.8.3"},"licenseText":"MIT License\n\nCopyright (c) 2018 Ryoji Ishii\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":"redux-cirquit@2.0.1","dist":{"shasum":"414d05503f9bb1d31fa4644c8ed96dc790a98430","tarball":"https://registry.npmjs.org/redux-cirquit/-/redux-cirquit-2.0.1.tgz","fileCount":11,"unpackedSize":17202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBXYACRA9TVsSAnZWagAAai8P/RjDG3vfiYwcD27OB2TQ\nGVvydEMYWxLdL0wK9YyX+k/BAvYE+ELhbVKc/bTdhJ9FSmwH2LfKUQrZKRAY\n35fTPyuJUfvpZ8U/2+89V+1dYFCObh3OCQnrUDlUk0az5V9SJ+eDPzBs+4LK\nW8aXiItuNILYe3EKVVDqME5jmeLh3KmOiDCvuF9X9AMSn3bYi3WUMX7wvGcW\nPNz6LMiSWGja8Y+9lm1KE7mY8z+p0kIZBfOOSZee2aWVetaixK+46s31tPfn\nOckgBMQQB+dI881ImUso5u7Q8xhwoYSI4hvCD7v5/RrN8+I1+vROQQa1o3NF\n81kW2cU5tv4+iADl8ssYR4LuGuzeClzJ8QO8EneYdcnWW+ckmpg5s6mnuIa1\n2cPxdVmgKhn63BdBRHxsA5Na0m5yZXd/8DWXrv2Yoy0Bw79AwZDTcdEu47ce\nK9UNp6tk+7ftDanRrkHskJlB4cQhH06qPWf/pYNE6SMyWcXy9r71qvSWabtk\nb/E54kCgDTWp/Ui/d8ugYZxTCxg9zSGi1Ey7TjjwOk+a8FJMcsTAXbSYFagL\nnFWcx2y/p8r6hCakO91Bx6KaJvX9O6q5ryXUJzSnA9FpwsoitGCFGTaqNCf7\nl6uVIhLDQweQAdm+3xLHyOxeDyg/BBZDnTk1wGXwgMC+lFPsX3FyJWm+Lj5l\nVpSf\r\n=H5pO\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-AAnSNWVZqM1G689K0+vx35PWxFbRVc8qX5W5N9ve3LU/acLf7RiP7oP9cDTkQBvEVnzXwwxTWKlsQmKJi3XHdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEAZI6kiBzp/1oo+UmbtFGjrxKP+Wk9Ic3WmSW7okPKEAiBYaW4ANUn1Fw0OgncBV3oseQ6CYSI25YJ7f+fRE7RMmg=="}]},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"_npmUser":{"name":"airtoxin","email":"airtoxin@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-cirquit_2.0.1_1527084542483_0.7916587558922212"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-22T21:14:55.288Z","0.0.1":"2018-03-22T21:14:55.384Z","modified":"2022-06-26T10:01:56.965Z","1.0.0":"2018-03-27T14:52:15.140Z","1.0.1":"2018-03-27T15:14:00.118Z","1.0.2-pre.0":"2018-03-27T15:21:18.872Z","1.0.2-pre.1":"2018-03-27T15:25:55.522Z","1.0.2-pre.2":"2018-03-27T15:29:32.068Z","1.0.2-pre.3":"2018-03-27T15:37:18.652Z","1.0.2":"2018-03-27T15:49:48.969Z","1.1.0-pre.0":"2018-03-27T15:51:39.365Z","1.1.0":"2018-03-27T16:02:37.310Z","1.2.0":"2018-03-30T15:29:18.996Z","1.3.0-alpha.0":"2018-03-31T23:34:11.053Z","1.3.0":"2018-04-01T00:10:20.274Z","1.4.0-0":"2018-04-05T14:16:12.770Z","1.4.0-1":"2018-04-05T14:24:58.077Z","1.4.0":"2018-04-05T14:36:56.230Z","1.4.1-0":"2018-04-07T04:03:29.756Z","1.4.1":"2018-04-07T04:13:08.789Z","2.0.0-0":"2018-04-18T13:39:23.895Z","2.0.0-1":"2018-04-18T14:46:12.398Z","2.0.0-2":"2018-04-18T15:10:49.115Z","2.0.0-3":"2018-04-18T23:33:43.601Z","2.0.0-4":"2018-04-20T08:54:46.730Z","2.0.0":"2018-04-20T09:04:44.905Z","2.0.1":"2018-05-23T14:09:02.553Z"},"maintainers":[{"name":"airtoxin","email":"airtoxin@icloud.com"}],"keywords":["redux","flux","react","state"],"repository":{"type":"git","url":"https://github.com/airtoxin/redux-cirquit"},"author":{"name":"airtoxin"},"license":"MIT","readme":"# redux-cirquit [![Build Status](https://travis-ci.org/airtoxin/redux-cirquit.svg?branch=master)](https://travis-ci.org/airtoxin/redux-cirquit)\n\n__To realize operation based short-circuiting redux.__\n\n<img src=\"/logo.png\" width=\"250px\" />\n\n## Concept\n\nThe aim of redux-cirquit is to realize operation based application system on redux ecosystem.\n\nRedux is an implementation of Flux based on __event based__ application system.\nIts concept is good but bit tired,\nbecause event system requires to define event elements separately each other (EventName, EventPublisher, EventSubscriber) to keep loose-coupling between event publisher and subscriber.\n\nEvent based application system is suitable for gigantic large sized application, but overkill for small or medium sized application.\nAnd we almost define its event elements (event publisher and subscriber) tightly-coupled.\nTightly-couped event system is nearly equals to __operation based__ application system.\nIf you use redux with operation based application system, there are no reason to define event elements separately (ActionTypes, Action, ActionCreator and Reducer).\n\nOperation based application system is much simpler than event based.\nThere is only exists \"Operation\", so your ActionCreator (with dispatch) is called as operation.\nThis is a redux-cirquit.\n\n```js\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n// execute increment operation\nstore.dispatch(increment(1));\n```\n\n## Install\n\n`$ npm install redux-cirquit` or `$ yarn add redux-cirquit`\n\n## Usage\n\n```js\nimport { createStore } from \"redux\";\nimport { createCirquitReducer, createOperation } from \"redux-cirquit\";\n\nconst initialState = {\n  counter: {\n    count: 0\n  }\n};\nconst cirquitReducer = createCirquitReducer(initialState);\nconst store = createStore(cirquitReducer);\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  counter: {\n    count: state.counter.count + amount\n  }\n}));\n\nstore.dispatch(increment(1)); // state is { counter: { count: 1 } }\n```\n\nwith combineReducers\n\n```js\nconst store = createStore(combineReducers({\n  counter: createCirquitReducer(initialCounterState, { namespace: \"counter\" }),\n  user: createCirquitReducer(initialUserState, { namespace: \"user\" })\n}));\n\nconst increment = amount => createOperation(state => ({\n  ...state,\n  count: state.count + amount\n}), { namespace: \"counter\" });\n\nstore.dispatch(increment(1));\n```\n\n[Full example](https://github.com/airtoxin/redux-cirquit-example)\n\n## API\n\n### export createCirquitReducer\\<State\\>(initialState: State, options?: { namespace?: string }): Redux.Reducer\\<State\\>\n\nCreates redux-cirquit's reducer.  \nIf you want to split reducer using `combineReducers`, you should specify `namespace` in option.\n\n### export createOperation\\<State\\>(reducer: (s: State) => State, options?: OperationOptions }): Redux.Action\n\nCreates operation to reduce state.  \nThe operation is actually redux's action.\n\n#### OperationOptions = { namespace?: string, meta?: { reducerName?: string, ...anyProps } }\n\nIf you use splitted reducer, you should set same `namespace` of reducer related to this action.  \n`meta` properties is almostly pass through to returned action's meta property except `meta.reducerName` property, so you can define any debugging informations in `meta`.  \n`meta.reducerName` is optional property to define action name.\nIf not specify `meta.reducerName`, [function name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) or \"anonymous\" is used.\n\n### getActionType(namespace: string): string\n\nGet action type used in redux-cirquit internally.\n\n## Articles\n\n[それでもやっぱり redux は面倒くさい](https://qiita.com/airtoxin/items/1632d523ad95adf6f3fe) (Japanese)\n\n## [Changelog](/CHANGELOG.md)\n\n## License\n\nMIT\n","readmeFilename":"README.md","description":"short-circuiting action -> reducer handling in redux."}