{"_id":"rko","_rev":"2974139","name":"rko","description":"- [Installation](#installation) - [Usage](#usage) - [Advanced Usage](#advanced-usage) - [Examples](#examples) - [Support](#support) - [Discussion](#discussion) - [Author](#author)","dist-tags":{"latest":"0.6.5"},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"time":{"modified":"2023-06-15T08:24:52.000Z","created":"2021-08-26T15:53:55.445Z","0.6.5":"2021-11-18T12:05:13.304Z","0.6.4":"2021-11-17T11:46:21.913Z","0.6.3":"2021-11-17T11:22:17.619Z","0.6.2":"2021-11-08T11:06:28.028Z","0.6.1":"2021-11-08T10:51:13.294Z","0.6.0":"2021-11-04T15:08:20.044Z","0.5.25":"2021-09-08T11:42:40.815Z","0.5.24":"2021-09-06T14:18:51.575Z","0.5.23":"2021-09-06T12:41:53.782Z","0.5.22":"2021-09-06T10:03:39.606Z","0.5.21":"2021-09-06T09:59:46.525Z","0.5.20":"2021-09-04T15:33:07.172Z","0.5.19":"2021-08-30T12:41:34.518Z","0.5.18":"2021-08-29T13:31:36.760Z","0.5.17":"2021-08-29T13:06:51.721Z","0.5.16":"2021-08-29T08:15:21.606Z","0.5.15":"2021-08-29T08:11:27.880Z","0.5.14":"2021-08-29T07:33:26.503Z","0.5.13":"2021-08-28T18:02:14.979Z","0.5.12":"2021-08-28T12:30:22.655Z","0.5.11":"2021-08-28T12:26:32.358Z","0.5.10":"2021-08-28T11:42:53.471Z","0.5.9":"2021-08-27T09:02:44.429Z","0.5.8":"2021-08-27T08:07:44.709Z","0.5.7":"2021-08-26T20:43:07.927Z","0.5.6":"2021-08-26T19:55:57.366Z","0.5.5":"2021-08-26T19:50:28.558Z","0.5.4":"2021-08-26T19:49:37.285Z","0.5.3":"2021-08-26T17:34:07.860Z","0.5.2":"2021-08-26T17:29:42.575Z","0.0.2":"2021-08-26T15:54:19.699Z","0.0.1":"2021-08-26T15:53:55.445Z"},"users":{},"author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"https://github.com/steveruizok/rko"},"versions":{"0.6.5":{"name":"rko","version":"0.6.5","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"https://github.com/steveruizok/rko"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","source":"src/index.ts","main":"dist/main.js","module":"dist/module.js","types":"dist/index.d.ts","browserlist":[">5%","ie11","chrome","firefox","safari","not dead"],"targets":{"default":{"distDir":"./dist","isLibrary":true}},"sourceMap":"inline","scripts":{"start":"parcel watch & cd example && yarn start","build":"parcel build && tsc --project tsconfig.build.json","check":"tsc --noEmit","lint":"eslint"},"devDependencies":{"@parcel/packager-ts":"^2.0.0","@parcel/transformer-js":"^2.0.0","@parcel/transformer-typescript-types":"^2.0.0","@swc-node/jest":"^1.4.1","@types/jest":"^27.0.2","fake-indexeddb":"^3.1.7","jest":"^27.3.1","parcel":"latest","react":"^17.0.2","react-dom":"^17.0.2","tslib":"^2.3.1","typescript":">=3.0.0"},"dependencies":{"idb-keyval":"^6.0.3","zustand":"^3.6.4"},"peerDependencies":{"react":">=16.8","react-dom":"^16.8 || ^17.0"},"jest":{"setupFilesAfterEnv":["<rootDir>/setupTests.ts"],"transform":{"^.+\\.(tsx|jsx|ts|js|mjs)?$":"@swc-node/jest"},"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"],"testEnvironment":"jsdom","modulePathIgnorePatterns":["<rootDir>/dist/","<rootDir>/example/"]},"description":"- [Installation](#installation) - [Usage](#usage) - [Advanced Usage](#advanced-usage) - [Examples](#examples) - [Support](#support) - [Discussion](#discussion) - [Author](#author)","licenseText":"MIT License\n\nCopyright (c) 2021 Stephen Ruiz Ltd\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":"rko@0.6.5","dist":{"shasum":"48069a97bc3ae96c86da2502e909247c6c25f861","size":47940,"noattachment":false,"key":"/rko/-/rko-0.6.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.6.5.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.6.5_1637237113115_0.220811146534315"},"_hasShrinkwrap":false,"publish_time":1637237113304,"_cnpm_publish_time":1637237113304,"_cnpmcore_publish_time":"2021-12-17T01:59:44.745Z"},"0.6.4":{"name":"rko","version":"0.6.4","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"https://github.com/steveruizok/rko"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","source":"src/index.ts","main":"dist/main.js","module":"dist/module.js","types":"dist/index.d.ts","browserlist":[">5%","ie11","chrome","firefox","safari","not dead"],"targets":{"default":{"distDir":"./dist","isLibrary":true}},"sourceMap":"inline","scripts":{"start":"parcel watch & cd example && yarn start","build":"parcel build && tsc --project tsconfig.build.json","check":"tsc --noEmit","lint":"eslint"},"devDependencies":{"@parcel/packager-ts":"^2.0.0","@parcel/transformer-js":"^2.0.0","@parcel/transformer-typescript-types":"^2.0.0","parcel":"latest","react":"^17.0.2","react-dom":"^17.0.2","tslib":"^2.3.1","typescript":">=3.0.0"},"dependencies":{"idb-keyval":"^6.0.3","zustand":"^3.6.4"},"peerDependencies":{"react":">=16.8","react-dom":"^16.8 || ^17.0"},"description":"- [Installation](#installation) - [Usage](#usage) - [Advanced Usage](#advanced-usage) - [Examples](#examples) - [Support](#support) - [Discussion](#discussion) - [Author](#author)","licenseText":"MIT License\n\nCopyright (c) 2021 Stephen Ruiz Ltd\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":"rko@0.6.4","dist":{"shasum":"40e2fe205032b623df26144db1f9c2cacab8818c","size":47454,"noattachment":false,"key":"/rko/-/rko-0.6.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.6.4.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.6.4_1637149581751_0.8676758365394328"},"_hasShrinkwrap":false,"publish_time":1637149581913,"_cnpm_publish_time":1637149581913,"_cnpmcore_publish_time":"2021-12-17T01:59:45.059Z"},"0.6.3":{"name":"rko","version":"0.6.3","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"https://github.com/steveruizok/rko"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","source":"src/index.ts","main":"dist/main.js","types":"dist/index.d.ts","targets":{"default":{"distDir":"./dist","isLibrary":true}},"sourceMap":"inline","scripts":{"start":"parcel watch & cd example && yarn start","build":"parcel build && tsc --project tsconfig.build.json","check":"tsc --noEmit","lint":"eslint"},"devDependencies":{"@parcel/packager-ts":"^2.0.0","@parcel/transformer-js":"^2.0.0","@parcel/transformer-typescript-types":"^2.0.0","parcel":"latest","react":"^17.0.2","react-dom":"^17.0.2","tslib":"^2.3.1","typescript":">=3.0.0"},"dependencies":{"idb-keyval":"^6.0.3","zustand":"^3.6.4"},"peerDependencies":{"react":">=16.8","react-dom":"^16.8 || ^17.0"},"description":"- [Installation](#installation) - [Usage](#usage) - [Advanced Usage](#advanced-usage) - [Examples](#examples) - [Support](#support) - [Discussion](#discussion) - [Author](#author)","licenseText":"MIT License\n\nCopyright (c) 2021 Stephen Ruiz Ltd\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":"rko@0.6.3","dist":{"shasum":"3656aad8c678875ead1c485cb63d150dea3db453","size":42449,"noattachment":false,"key":"/rko/-/rko-0.6.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.6.3.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.6.3_1637148137448_0.8576265204812668"},"_hasShrinkwrap":false,"publish_time":1637148137619,"_cnpm_publish_time":1637148137619,"_cnpmcore_publish_time":"2021-12-17T01:59:45.870Z"},"0.6.2":{"name":"rko","version":"0.6.2","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"https://github.com/steveruizok/rko"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","source":"src/index.ts","main":"dist/main.js","module":"dist/module.js","types":"dist/index.d.ts","targets":{"default":{"distDir":"./dist","isLibrary":true}},"sourceMap":"inline","scripts":{"start":"parcel watch & cd example && yarn start","build":"parcel build && tsc --project tsconfig.build.json","check":"tsc --noEmit","lint":"eslint"},"devDependencies":{"@parcel/packager-ts":"^2.0.0","@parcel/transformer-js":"^2.0.0","@parcel/transformer-typescript-types":"^2.0.0","parcel":"latest","react":"^17.0.2","react-dom":"^17.0.2","tslib":"^2.3.1","typescript":">=3.0.0"},"dependencies":{"idb-keyval":"^6.0.3","zustand":"^3.6.4"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"description":"- [Installation](#installation) - [Usage](#usage) - [Advanced Usage](#advanced-usage) - [Examples](#examples) - [Support](#support) - [Discussion](#discussion) - [Author](#author)","licenseText":"MIT License\n\nCopyright (c) 2021 Stephen Ruiz Ltd\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":"rko@0.6.2","dist":{"shasum":"34dd6c68623db4f5147e3d2697d51971106083d8","size":42430,"noattachment":false,"key":"/rko/-/rko-0.6.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.6.2.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.6.2_1636369587893_0.3462899521983551"},"_hasShrinkwrap":false,"publish_time":1636369588028,"_cnpm_publish_time":1636369588028,"_cnpmcore_publish_time":"2021-12-17T01:59:46.307Z"},"0.6.1":{"name":"rko","version":"0.6.1","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"https://github.com/steveruizok/rko"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","source":"src/index.ts","main":"dist/main.js","module":"dist/module.js","types":"dist/index.d.ts","targets":{"default":{"distDir":"./dist","isLibrary":true}},"sourceMap":"inline","scripts":{"start":"parcel watch & cd example && yarn start","build":"parcel build && tsc --project tsconfig.build.json","check":"tsc --noEmit","lint":"eslint"},"devDependencies":{"@parcel/packager-ts":"^2.0.0","@parcel/transformer-js":"^2.0.0","@parcel/transformer-typescript-types":"^2.0.0","parcel":"latest","tslib":"^2.3.1","typescript":">=3.0.0","react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^6.0.3","zustand":"^3.6.4"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"description":"- [Installation](#installation) - [Usage](#usage) - [Advanced Usage](#advanced-usage) - [Examples](#examples) - [Support](#support) - [Discussion](#discussion) - [Author](#author)","licenseText":"MIT License\n\nCopyright (c) 2021 Stephen Ruiz Ltd\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":"rko@0.6.1","dist":{"shasum":"3857bf65696624c09bbda8107731a6162ce7160d","size":99192,"noattachment":false,"key":"/rko/-/rko-0.6.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.6.1.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.6.1_1636368673074_0.6178734028064872"},"_hasShrinkwrap":false,"publish_time":1636368673294,"_cnpm_publish_time":1636368673294,"_cnpmcore_publish_time":"2021-12-17T01:59:46.829Z"},"0.6.0":{"private":false,"version":"0.6.0","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start:pre":"node scripts/pre-dev && yarn types:pre","start":"node scripts/dev & yarn types:dev","build":"node scripts/build && yarn types:build && node scripts/copy-readme","types:pre":"tsc","types:dev":"tsc --watch","types:build":"tsc --project tsconfig.build.json","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc","docs:watch":"typedoc --watch"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"50237e231aca8f9f84d43fc6795778137dd09b7a","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.6.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+arm64 (darwin)","dist":{"shasum":"fa640384b4e82fdcd90fc58c958256148c4eb10c","size":11125,"noattachment":false,"key":"/rko/-/rko-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.6.0.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.6.0_1636038499911_0.7185239826124945"},"_hasShrinkwrap":false,"publish_time":1636038500044,"_cnpm_publish_time":1636038500044,"_cnpmcore_publish_time":"2021-12-17T01:59:47.078Z"},"0.5.25":{"private":false,"version":"0.5.25","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start:pre":"node scripts/pre-dev && yarn types:pre","start":"node scripts/dev & yarn types:dev","build":"node scripts/build && yarn types:build","types:pre":"tsc","types:dev":"tsc --watch","types:build":"tsc --project tsconfig.build.json","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc","docs:watch":"typedoc --watch"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"3d3985681d8d477301eb689954ab6ec434cf6385","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.25","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"1095803900e3f912f6adf8a1c113b8227d3d88bf","size":14254,"noattachment":false,"key":"/rko/-/rko-0.5.25.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.25.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.25_1631101360631_0.38141342777864184"},"_hasShrinkwrap":false,"publish_time":1631101360815,"_cnpm_publish_time":1631101360815,"_cnpmcore_publish_time":"2021-12-17T01:59:47.344Z"},"0.5.24":{"private":false,"version":"0.5.24","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start:pre":"node scripts/pre-dev && yarn types:pre","start":"node scripts/dev & yarn types:dev","build":"node scripts/build && yarn types:build","types:pre":"tsc","types:dev":"tsc --watch","types:build":"tsc --project tsconfig.build.json","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc","docs:watch":"typedoc --watch"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"7bf28189c4d76bdc89db49a78432c1dfdbb52ba0","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.24","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"a45b2238a5cb2044459c0ac43a9c0f25c2e69e7a","size":14210,"noattachment":false,"key":"/rko/-/rko-0.5.24.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.24.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.24_1630937931403_0.6564369949484223"},"_hasShrinkwrap":false,"publish_time":1630937931575,"_cnpm_publish_time":1630937931575,"_cnpmcore_publish_time":"2021-12-17T01:59:47.535Z"},"0.5.23":{"private":false,"version":"0.5.23","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start:pre":"node scripts/pre-dev && yarn types:pre","start":"node scripts/dev & yarn types:dev","build":"node scripts/build && yarn types:build","types:pre":"tsc","types:dev":"tsc --watch","types:build":"tsc --project tsconfig.build.json","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc","docs:watch":"typedoc --watch"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"f64af1daf68dd84edda245f4fe2f9dde18f6dd7f","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.23","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"2613c05d518df71b08215bb031aa4680ede51302","size":14092,"noattachment":false,"key":"/rko/-/rko-0.5.23.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.23.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.23_1630932113658_0.23461003337165276"},"_hasShrinkwrap":false,"publish_time":1630932113782,"_cnpm_publish_time":1630932113782,"_cnpmcore_publish_time":"2021-12-17T01:59:47.719Z"},"0.5.22":{"private":false,"version":"0.5.22","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start:pre":"node scripts/pre-dev && yarn types:pre","start":"node scripts/dev & yarn types:dev","build":"yarn clean && node scripts/build && yarn types:build","types:pre":"tsc","types:dev":"tsc --watch","types:build":"tsc --project tsconfig.build.json","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc","docs:watch":"typedoc --watch"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"775d610e168c118ebe86102b4dc1eec150b108ad","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.22","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"d5a563beefd97a9cfdda3c29c1fbe119d782b576","size":11611,"noattachment":false,"key":"/rko/-/rko-0.5.22.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.22.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.22_1630922619461_0.15626763468269966"},"_hasShrinkwrap":false,"publish_time":1630922619606,"_cnpm_publish_time":1630922619606,"_cnpmcore_publish_time":"2021-12-17T01:59:47.915Z"},"0.5.21":{"private":false,"version":"0.5.21","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"8236444ed6a2b7872a29794c2185c2abfe778c7f","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.21","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"980491c05248be4e2fbf82b5c0230a23220bbeff","size":33145,"noattachment":false,"key":"/rko/-/rko-0.5.21.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.21.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.21_1630922386342_0.49562876239462805"},"_hasShrinkwrap":false,"publish_time":1630922386525,"_cnpm_publish_time":1630922386525,"_cnpmcore_publish_time":"2021-12-17T01:59:48.580Z"},"0.5.20":{"private":false,"version":"0.5.20","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"e456701d893e27f44dff5c69e1dc1662ceadba07","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.20","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"a0a374e9b8d6880f05a1d13f2efc277299644e19","size":32237,"noattachment":false,"key":"/rko/-/rko-0.5.20.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.20.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.20_1630769587036_0.23897709870884754"},"_hasShrinkwrap":false,"publish_time":1630769587172,"_cnpm_publish_time":1630769587172,"_cnpmcore_publish_time":"2021-12-17T01:59:48.842Z"},"0.5.19":{"private":false,"version":"0.5.19","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"0eebda6d4fe13608a115dfdb605e9e3150c7d182","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.19","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"33577596167178abc30063b6dd0a8bbde0362c27","size":32132,"noattachment":false,"key":"/rko/-/rko-0.5.19.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.19.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.19_1630327294309_0.17136616992633602"},"_hasShrinkwrap":false,"publish_time":1630327294518,"_cnpm_publish_time":1630327294518,"_cnpmcore_publish_time":"2021-12-17T01:59:49.261Z"},"0.5.18":{"private":false,"version":"0.5.18","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"c19b64fd37f5cca93e76782c9896244476d07510","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.18","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"cbbc45f073b1db1884112479b18ed04a799065ec","size":31952,"noattachment":false,"key":"/rko/-/rko-0.5.18.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.18.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.18_1630243896527_0.1829542491608056"},"_hasShrinkwrap":false,"publish_time":1630243896760,"_cnpm_publish_time":1630243896760,"_cnpmcore_publish_time":"2021-12-17T01:59:49.538Z"},"0.5.17":{"private":false,"version":"0.5.17","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"d0fc7c99ba6652277b315a7e13d5fcec7c00a299","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.17","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"f15d9540168a995ff8e3572a483ebafe3b32b180","size":32547,"noattachment":false,"key":"/rko/-/rko-0.5.17.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.17.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.17_1630242411533_0.894459328937595"},"_hasShrinkwrap":false,"publish_time":1630242411721,"_cnpm_publish_time":1630242411721,"_cnpmcore_publish_time":"2021-12-17T01:59:49.784Z"},"0.5.16":{"private":false,"version":"0.5.16","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"cdf59e5d9d83b8b0b78f244f683c05f76b7def84","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.16","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"c3249b5df7d0f4bc4c23c79c5b379b7870e1d9ff","size":32547,"noattachment":false,"key":"/rko/-/rko-0.5.16.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.16.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.16_1630224921478_0.8275644033692298"},"_hasShrinkwrap":false,"publish_time":1630224921606,"_cnpm_publish_time":1630224921606,"_cnpmcore_publish_time":"2021-12-17T01:59:50.078Z"},"0.5.15":{"private":false,"version":"0.5.15","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"8c8f6963dae9ad76bd854b6774e10c9bcf419296","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.15","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"5baea98d1dc428929a7202464a2372960b3fbf44","size":32503,"noattachment":false,"key":"/rko/-/rko-0.5.15.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.15.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.15_1630224687729_0.7827398664243896"},"_hasShrinkwrap":false,"publish_time":1630224687880,"_cnpm_publish_time":1630224687880,"_cnpmcore_publish_time":"2021-12-17T01:59:50.795Z"},"0.5.14":{"private":false,"version":"0.5.14","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"4c8a312fd2feedf13b30b2ffae135c60baba7925","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.14","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"891d72362672c6e42f4fc0e039de5e65259311ef","size":32070,"noattachment":false,"key":"/rko/-/rko-0.5.14.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.14.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.14_1630222406377_0.7544470021565284"},"_hasShrinkwrap":false,"publish_time":1630222406503,"_cnpm_publish_time":1630222406503,"_cnpmcore_publish_time":"2021-12-17T01:59:51.052Z"},"0.5.13":{"private":false,"version":"0.5.13","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"33d236519f1de4acb9e15989b72fe43cd1b7c6f4","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.13","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"e73393244c27b413231b0ba9f04d877e1a383777","size":31282,"noattachment":false,"key":"/rko/-/rko-0.5.13.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.13.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.13_1630173734833_0.05943118360395627"},"_hasShrinkwrap":false,"publish_time":1630173734979,"_cnpm_publish_time":1630173734979,"_cnpmcore_publish_time":"2021-12-17T01:59:51.351Z"},"0.5.12":{"private":false,"version":"0.5.12","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"1e3cf27b077caaeb79b09e4c370fec8172692033","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.12","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"64566a18fcea21820a74777fcc45893cab7f15be","size":29660,"noattachment":false,"key":"/rko/-/rko-0.5.12.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.12.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.12_1630153822483_0.9296042388296926"},"_hasShrinkwrap":false,"publish_time":1630153822655,"_cnpm_publish_time":1630153822655,"_cnpmcore_publish_time":"2021-12-17T01:59:51.627Z"},"0.5.11":{"private":false,"version":"0.5.11","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"safari-14-idb-fix":"^1.0.4"},"gitHead":"89e2306a7f570d5016a1e9e369d865793333d29e","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.11","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"b6658d4d3061d73d6812198ccc81aa3eda7bdabe","size":32512,"noattachment":false,"key":"/rko/-/rko-0.5.11.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.11.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.11_1630153592222_0.062368921928046994"},"_hasShrinkwrap":false,"publish_time":1630153592358,"_cnpm_publish_time":1630153592358,"_cnpmcore_publish_time":"2021-12-17T01:59:51.880Z"},"0.5.10":{"private":false,"version":"0.5.10","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"c9de8e6c129dfe9edddf971cf37980c4a8367e4d","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.10","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"03c0cfae1119926706168304043085975be37eb9","size":29894,"noattachment":false,"key":"/rko/-/rko-0.5.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.10.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.10_1630150973307_0.24761973576209195"},"_hasShrinkwrap":false,"publish_time":1630150973471,"_cnpm_publish_time":1630150973471,"_cnpmcore_publish_time":"2021-12-17T01:59:52.099Z"},"0.5.9":{"private":false,"version":"0.5.9","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"84e85a954bea9c85253b411a0583959a69d53ae3","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.9","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"9b878efc2e790640dd71f77efa791ec7ab2df5d6","size":28110,"noattachment":false,"key":"/rko/-/rko-0.5.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.9.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.9_1630054964272_0.2214848390871169"},"_hasShrinkwrap":false,"publish_time":1630054964429,"_cnpm_publish_time":1630054964429,"_cnpmcore_publish_time":"2021-12-17T01:59:52.372Z"},"0.5.8":{"private":false,"version":"0.5.8","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"idb-keyval":"^5.1.3","zustand":"^3.5.9"},"gitHead":"161a2ca056b63fb5450942a0aef4e88259031dd1","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.8","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"2b5d0a92dd832b21501d028f8b63a766261bdf69","size":27724,"noattachment":false,"key":"/rko/-/rko-0.5.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.8.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.8_1630051664565_0.7550175719995849"},"_hasShrinkwrap":false,"publish_time":1630051664709,"_cnpm_publish_time":1630051664709,"_cnpmcore_publish_time":"2021-12-17T01:59:53.019Z"},"0.5.7":{"private":false,"version":"0.5.7","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"zustand":"^3.5.9"},"gitHead":"5f92683dda615706366963b02389a9fc3164b727","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.7","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"411d9ff4d982441e7844ff49c01ca33f96b2840b","size":28000,"noattachment":false,"key":"/rko/-/rko-0.5.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.7.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.7_1630010587776_0.05174613423430219"},"_hasShrinkwrap":false,"publish_time":1630010587927,"_cnpm_publish_time":1630010587927,"_cnpmcore_publish_time":"2021-12-17T01:59:53.286Z"},"0.5.6":{"private":false,"version":"0.5.6","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"dependencies":{"zustand":"^3.5.9"},"gitHead":"3c56f0c633056f95e50d68ea890b493b0bbca46b","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.6","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"7ad8105153524dbdb9e8488fecd179b272ef4c0b","size":28122,"noattachment":false,"key":"/rko/-/rko-0.5.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.6.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.6_1630007757169_0.9049511631577314"},"_hasShrinkwrap":false,"publish_time":1630007757366,"_cnpm_publish_time":1630007757366,"_cnpmcore_publish_time":"2021-12-17T01:59:53.644Z"},"0.5.5":{"private":false,"version":"0.5.5","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"c5dcef4ae4c5540fc4a4886c67119a402ff697b5","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.5","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"7e1efe0a6b5811c94ea4584b63b3d4b0160e5c1b","size":28108,"noattachment":false,"key":"/rko/-/rko-0.5.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.5.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.5_1630007428409_0.3330117824710892"},"_hasShrinkwrap":false,"publish_time":1630007428558,"_cnpm_publish_time":1630007428558,"_cnpmcore_publish_time":"2021-12-17T01:59:53.912Z"},"0.5.4":{"private":false,"version":"0.5.4","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","fake-indexeddb":"^3.1.3","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"c844edb33a826a0b1749b8099255024863dffdab","description":"![logo](./rko-logo.svg)","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.4","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"1439469ad577e748b69485b0b2a91fb346f46031","size":28110,"noattachment":false,"key":"/rko/-/rko-0.5.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.4.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.4_1630007377125_0.41123862674241307"},"_hasShrinkwrap":false,"publish_time":1630007377285,"_cnpm_publish_time":1630007377285,"_cnpmcore_publish_time":"2021-12-17T01:59:54.526Z"},"0.5.3":{"private":false,"version":"0.5.3","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"8a6a0b1d3c8ec1d607ab6e8c1f7e0e69e05293bc","description":"A state manager for React, built on [Zustand](https://github.com/pmndrs/zustand), with built-in undo, redo and persistence.","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.3","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"461c41351fe25b53a90345ce8880a7cb909e24c5","size":17642,"noattachment":false,"key":"/rko/-/rko-0.5.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.3.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.3_1629999247722_0.3161757792850546"},"_hasShrinkwrap":false,"publish_time":1629999247860,"_cnpm_publish_time":1629999247860,"_cnpmcore_publish_time":"2021-12-17T01:59:54.784Z"},"0.5.2":{"private":false,"version":"0.5.2","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"b22585df1caa1c84905f26157c2ea60f2d406cb2","description":"A state manager for React, built on [Zustand](https://github.com/pmndrs/zustand), with built-in undo, redo and persistence.","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.5.2","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+arm64 (darwin)","dist":{"shasum":"f75f0f5fe1cfa6fde9859f990996eca6a43d11bd","size":17471,"noattachment":false,"key":"/rko/-/rko-0.5.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.5.2.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.5.2_1629998982403_0.20594989521210705"},"_hasShrinkwrap":false,"publish_time":1629998982575,"_cnpm_publish_time":1629998982575,"_cnpmcore_publish_time":"2021-12-17T01:59:55.132Z"},"0.0.2":{"private":false,"version":"0.0.2","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"description":"A state manager for React, built on [Zustand](https://github.com/pmndrs/zustand), with built-in undo, redo and persistence.","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.0.2","_nodeVersion":"16.6.1","_npmVersion":"7.20.3","dist":{"shasum":"d62afe014db460a2c9d209508da55a36e0c51223","size":17459,"noattachment":false,"key":"/rko/-/rko-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.0.2.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.0.2_1629993259526_0.5151092010636293"},"_hasShrinkwrap":false,"publish_time":1629993259699,"_cnpm_publish_time":1629993259699,"_cnpmcore_publish_time":"2021-12-17T01:59:55.384Z"},"0.0.1":{"private":false,"version":"0.0.1","name":"rko","author":{"name":"Steve Ruiz","url":"https://twitter.com/steveruizok"},"repository":{"type":"git","url":"git+https://github.com/steveruizok/rko.git"},"keywords":["state","react","undo","redo","persistence"],"license":"MIT","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","scripts":{"start":"node scripts/dev & tsc --watch --incremental --emitDeclarationOnly --declarationMap --outDir dist/types","build":"yarn clean && node scripts/build && tsc --project tsconfig.build.json  --emitDeclarationOnly --outDir dist/types","lint":"eslint src/ --ext .ts,.tsx","clean":"rm -rf dist","ts-node":"ts-node","docs":"typedoc --entryPoints src/index.ts"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^15.0.1","@types/react":"^17.0.16","@types/react-dom":"^17.0.9","esbuild":"^0.12.21","eslint":"^7.22.0","react":"^17.0.2","react-dom":"^17.0.2","ts-node":"^9.1.1","tslib":"^2.3.0","typedoc":"^0.20.35","typescript":"^4.3.5"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"description":"A state manager for React, built on [Zustand](https://github.com/pmndrs/zustand), with built-in undo, redo and persistence.","bugs":{"url":"https://github.com/steveruizok/rko/issues"},"homepage":"https://github.com/steveruizok/rko#readme","_id":"rko@0.0.1","_nodeVersion":"16.6.1","_npmVersion":"7.20.3","dist":{"shasum":"cc119a7c976e88037ab90bdae346eb7b720c783f","size":18001,"noattachment":false,"key":"/rko/-/rko-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rko/download/rko-0.0.1.tgz"},"_npmUser":{"name":"steveruizok","email":"steveruizok@gmail.com"},"directories":{},"maintainers":[{"name":"npm:steveruizok","email":""},{"name":"steveruizok","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rko_0.0.1_1629993235307_0.8660437288000342"},"_hasShrinkwrap":false,"publish_time":1629993235445,"_cnpm_publish_time":1629993235445,"_cnpmcore_publish_time":"2021-12-17T01:59:55.618Z"}},"readme":"![logo](./rko-logo.svg)\n\nOut of nowhere! A state management library for React with built-in undo, redo, and persistence. Built on [Zustand](https://github.com/pmndrs/zustand).\n\n![logo](./rko-logo-shadow.svg)\n\n????‍???? Check out the [example project](https://codesandbox.io/s/rko-example-mf9cx).\n\n???? Like this? Consider [becoming a sponsor](https://github.com/sponsors/steveruizok?frequency=recurring&sponsor=steveruizok).\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Advanced Usage](#advanced-usage)\n- [Examples](#examples)\n- [Support](#support)\n- [Discussion](#discussion)\n- [Author](#author)\n\n## Installation\n\n```bash\nnpm install rko\n```\n\nor\n\n```bash\nyarn add rko\n```\n\n## Usage\n\n> ????‍???? Using TypeScript? See [here](#using-with-typescript) for additional docs.\n\nTo use the library, first define your state as a class that extends `StateManager`. In your methods, you can use the `StateManager`'s [internal API](#internal-api) to update the state.\n\n```ts\n// state.js\nimport { StateManager } from \"rko\"\n\nclass MyState extends StateManager {\n  adjustCount = (n) =>\n    this.setState({\n      before: {\n        count: this.state.count,\n      },\n      after: {\n        count: this.state.count + n,\n      },\n    })\n}\n```\n\nNext, export an instance of the state. If you want to persist the state, give it an `id`.\n\n```js\nexport const myState = new MyState({ count: 0 }, \"my-state\")\n```\n\nIn your React components, you can use the state's `useStore` hook to select out the data you need. For more on the `useStore` hook, see zustand's [documentation](https://github.com/pmndrs/zustand#then-bind-your-components-and-thats-it).\n\n```jsx\n// app.jsx\nimport { myState } from \"./state\"\n\nfunction App() {\n  const { count } = myState.useStore((s) => s.count)\n  return (\n    <div>\n      <h1>{count}</h1>\n    </div>\n  )\n}\n```\n\nYou can also call your state's methods from your React components.\n\n```jsx\nfunction App() {\n  const { count } = myState.useStore((s) => s.count)\n\n  function increment() {\n    myState.adjustCount(1)\n  }\n\n  return (\n    <div>\n      <h1>{count}</h1>\n      <button onClick={increment}>Increment</button>\n    </div>\n  )\n}\n```\n\n...and you can use the `StateManager`'s [built-in methods](#public-api) too.\n\n```jsx\nfunction App() {\n  const { count } = myState.useStore((s) => s.count)\n\n  function increment() {\n    myState.adjustCount(1)\n  }\n\n  return (\n    <div>\n      <h1>{count}</h1>\n      <button onClick={increment}>Increment</button>\n      <button onClick={myState.undo}>Undo</button>\n      <button onClick={myState.redo}>Redo</button>\n    </div>\n  )\n}\n```\n\nRight on, you've got your global state.\n\n## StateManager\n\nThe `rko` library exports a class named `StateManager` that you can extend to create a global state for your app. The methods you add to the class can access the `StateManager`'s [internal API](#internal-api).\n\n```ts\nimport { StateManager } from \"rko\"\n\nclass AppState extends StateManager {\n  // your methods here\n}\n```\n\nYou only need to create one instance of your `StateManager` sub-class. When you create the instance, pass an **initial state** object to its constructor.\n\n```ts\nconst initialState = {\n  // ...\n}\n\nexport const appState = new AppState(initialState)\n```\n\nYou can also use the constructor to:\n\n- [persist](#persisting-the-state) the state\n- [upgrade](#upgrading-the-persisted-state) a previously-persisted state.\n\n### Internal API\n\nYou can use `StateManager`'s internal API to update your state from within your your sub-class methods.\n\n#### `patchState(patch: Patch<State>, id?: string)`\n\nUpdate the state without effecting the undo/redo stack. This method accepts a `Patch` type object, or a \"deep partial\" of the state object containing only the changes that you wish to make.\n\n```ts\ntoggleMenuOpen = () =>\n  this.patchState({\n    ui: {\n      menuOpen: !this.state.ui.menuOpen,\n    },\n  })\n```\n\nYou can pass an id as `setState`'s second parameter. This is provided to help with logging and debugging. The id will be saved in the history stack and be available in the [`onStateWillChange`](#onstatewillchange) and [`onStateDidChange`](#onstatedidchange) callbacks.\n\nFor example, this method:\n\n```js\n addMessage(newMessage) {\n    this.patchState({ message: newMessage }, \"added_message\")\n  }\n```\n\nWould cause `onStateDidChange` to receive `added_message` as its second argument.\n\n#### `setState(command: Command<State>, id?: string)`\n\nUpdate the state, push the command to the undo/redo stack, and persist the new state. This method accepts a `Command` type object containing two `Patch`es: `before` and `after`. The `after` patch should contain the changes to the state that you wish to make immediately and when the command is \"re-done\". The `before` patch should contain the changes to make when the command is \"undone\".\n\n```ts\nadjustCount = (n) =>\n  this.setState({\n    before: {\n      count: this.state.count,\n    },\n    after: {\n      count: this.state.count + n,\n    },\n  })\n```\n\nLike [`patchState`](#patchstate), you can provide an id as the method's second argument. Alternatively, you can provide the id as part of the command object. If you provide _both_, then the argument id will be used instead.\n\n#### `replaceState(state: State, id?: string)`\n\nWorks like `patchState` but accepts an entire state instead of a patch. This is useful for cases where a deep merge may be too expensive, such as changing items during a drag or scroll interaction. Note that, like `patchState`, this method will not effect the undo/redo stack. You might also want to call `resetHistory`.\n\n```ts\nloadNewTodos = (state: State) =>\n  this.replaceState({\n    todos,\n  })\n```\n\n#### `cleanup(next: State, prev: State, patch: Patch<State>)`\n\nThe cleanup method is called on every state change, _after_ applying the current patch. It receives the next state, the previous state, and the patch that was just applied. It returns the \"final\" updated state.\n\n```ts\ncleanup = (next: State) => {\n  const final = { ...state }\n\n  for (const id in todos) {\n    if (todos[id] === \"undefined\") {\n      delete final.todos[id]\n    }\n  }\n\n  return final\n}\n```\n\nYou can override this method in order to clean up any state that is no longer needed. Note that the changes won't be present in the undo/redo stack.\n\nYou can also override this method to log changes or implement\nmiddleware (see [Using Middleware](#using-middleware)).\n\n#### `ready`\n\nThe `ready` Promise will resolve after the state finishes loading persisted data, if any.\n\n```ts\nconst state = new Example()\nconst message = await state.ready\n// message = 'none' | 'migrated' | 'restored'\n```\n\n#### `onReady()`\n\nThe `onReady` method is called when the state is finished loading\npersisted data, if any.\n\n```ts\nclass Example extends StateManager {\n  onReady() {\n    console.log(\"loaded state from indexdb\", this.state)\n  }\n}\n```\n\n#### onPatch(state: State, id?: string)\n\nThe `onPatch` method is called after the state is changed from an `onPatch` call.\n\n#### onCommand(state: State, id?: string)\n\nThe `onCommand` method is called after the state is changed from an `onCommand` call.\n\n#### onPersist(state: State, id?: string)\n\nThe `onPersist` method is called when the state would be persisted to storage. This method is called even if the state is not actually persisted, e.g. an `id` is not provided.\n\n#### onReplace(state: State)\n\nThe `onReplace` method is called after a call to `replaceState`.\n\n#### onReset(state: State)\n\nThe `onReset` method is called after a call to `resetState`.\n\n#### onResetHistory(state: State)\n\nThe `onResetHistory` method is called after a call to `resetHistory`.\n\n#### `onStateWillChange(state: State, id?: string)`\n\nThe `onStateWillChange` method is called just before each state change. It runs after `cleanup`. Your React components will _not_ have updated when this method runs.\n\n```ts\nonStateWillChange = (state: State, id: string) => {\n  console.log(\"Changing from\", this.state, \"to\", state, \"because\", id)\n  // > Changed from {...} to {...} because command:toggled_todo\n}\n```\n\nIts first argument is the _next_ state. (You can still access the current state as `this.state`). The `id` argument will be either `patch`, `command`, `undo`, `redo`, or `reset`.\n\nYou can override this method to log changes or implement middleware (see [Using Middleware](#using-middleware)). If you're interested in _what_ changed, consider using the [cleanup](#cleanup) method instead.\n\n#### `onStateDidChange(state: State, id?: string)`\n\nThe `onStateDidChange` method works just like `onStateWillChange`, except that it runs _after_ the state has updated. Your React components will have updated by the time this method runs.\n\n```ts\nonStateDidChange = (state: State, id: string) => {\n  console.log(\"Changed to\", state, \"because\", id)\n  // > Changed to {...} because command:toggled_todo\n}\n```\n\n#### `snapshot`\n\nThe most recently saved snapshot, or else the initial state if `setSnapshot` has not yet been called. You can use the `snapshot` to restore earlier parts of the state (see [Using Snapshots](#using-snapshots)). Readonly.\n\n### Public API\n\nThe `StateManager` class exposes a public API that you can use to interact with your state either from within your class methods or from anywhere in your application.\n\n#### `undo()`\n\nMove backward in history, un-doing the most recent change.\n\n#### `redo()`\n\nMove forward in history, re-doing the previous undone change.\n\n#### `reset()`\n\nReset the state to its initial state (as provided in the constructor). This is not undoable. Calling `reset()` will also reset the history.\n\n#### `replaceHistory(stack: Command[], pointer?: number)`\n\nReplace the state's history. By default the pointer will be set to the end of the stack. Note that it's your responsibility to ensure that the new history stack is compatible with the current state!\n\n#### `resetHistory()`\n\nReset the state's history.\n\n#### `forceUpdate()`\n\nForce the state to update.\n\n#### `setSnapshot()`\n\nSave the current state to the the `snapshot` property (see [Using Snapshots](#using-snapshots)).\n\n#### `useStore`\n\nThe [zustand hook](https://github.com/pmndrs/zustand#then-bind-your-components-and-thats-it) used to subscribe components to the state.\n\n#### `pointer`\n\nThe current pointer. Readonly.\n\n#### `state`\n\nThe current state. Readonly.\n\n#### `status`\n\nThe current status of the state: `ready` or `loading`. If restoring a persisted state, the state will briefly be `loading` while the state is being restored (see [Persisting the State](#persisting-the-state)). Readonly.\n\n#### `canUndo`\n\nWhether the state can undo, given its undo/redo stack. Readonly.\n\n#### `canRedo`\n\nWhether the state can redo, given its undo/redo stack. Readonly.\n\n## Advanced Usage\n\n### Using with TypeScript\n\nTo use this library with TypeScript, define an interface for your state object and then use it as a generic when extending `StateManager`.\n\n```ts\nimport { StateManager, Patch, Command } from \"rko\"\n\ninterface State {\n  name: string\n  count: number\n}\n\nclass MyState extends StateManager<State> {\n  // ...\n}\n```\n\nDepending on how you're using the library (and your TypeScript config), you might also need the library's `Patch` and `Command` types. Both take your state interface as a generic.\n\n```ts\ncleanup = (next: State, prev: State, patch: Patch<State>) => {\n  log(patch)\n  return next\n}\n```\n\n#### Persisting the State\n\nTo **persist** the state, pass an **id** string to the class constructor.\n\n```ts\nexport const appState = new AppState({ count: 0 }, \"counter\")\n```\n\nThe library will now save a copy of the state after each new call to `setState`, `undo`, `redo`, or `reset`. The next time you create a new instance of your `StateManager` sub-class, it will restore the state from the persisted state.\n\nBecause restoring a state is done _asynchronously_, the provided initial state will be used on your app's first render. To avoid a flash of content as the app loads, you can use the state's `status` property, which may be either `loading` or `ready`.\n\n```jsx\nfunction App() {\n  const { count } = myState.useStore((s) => s.count)\n\n  if (myState.status === \"loading\") {\n    return null\n  }\n\n  return <h1>{count}</h1>\n}\n```\n\n#### Upgrading the Persisted State\n\nThe constructor also accepts a version number. If you want to replace the persisted state, you can bump the version number.\n\n```ts\nconst initialState = { wins: 0, losses: 0 }\n\n// Will persist state under the key 'game'\nexport const appState = new AppState(initialState, \"game\", 1)\n```\n\nBy default, if the constructor finds a persisted state with the same id but a lower version number it will replace the persisted state with the initial state that you provide.\n\n```ts\nconst initialState = { wins: 0, losses: 0, score: 0 }\n\n// Will replace any previous 'game' state with a version < 2\nexport const appState = new AppState(initialState, \"game\", 2)\n```\n\nIf you want to migrate or \"upgrade\" the earlier persisted state instead, you can pass a function that will receive the previous state, the new state, and the previous version number, and return the new state for this version.\n\n```ts\nconst initialState = { wins: 0, losses: 0, score: 0 }\n\nexport const appState = new AppState(\n  initialState,\n  \"game\",\n  2,\n  (prev, next, version) => ({\n    ...prev,\n    score: prev.wins * 10,\n  })\n)\n```\n\nNote that this \"upgrade\" function will only run when an earlier version is found on the user's machine under the provided key.\n\n### Using Middleware\n\nTo use middleware or run side effects when the state changes, override the [`cleanup`](#cleanup) method in your `StateManager` sub-class.\n\n```ts\ncleanup = (next, prev, patch) => {\n  // Log an ID from the patch?\n  if (patch.patchId) {\n    logger.log(patch.patchId)\n  }\n\n  // Create a JSON patch and update the server?\n  const serverPatch = jsonpatch.compare(prev, state)\n  server.sendUpdate(clientId, serverPatch)\n\n  return next\n}\n```\n\nRemember that `cleanup` runs _before_ the new state is passed to the zustand store. Your components will not yet have received the new state.\n\n### Using Snapshots\n\nDepending on your application, you may need to restore data from an earlier state. You can use the `snapshot` property and `setSnapshot` method to make this easier.\n\nFor example, if a user is was editing a todo's text, they would likely want to \"undo\" back to the text as it was before they began editing, and \"redo\" to the text as it was when they finished editing.\n\nTo do this, you would call `setSnapshot` when the user focuses the text input, in order to preserve the state before the user begins typing.\n\n```js\nbeginEditingTodo = () => {\n  this.setSnapshot()\n}\n```\n\nAs the user types, you would call `patchState` in order to change the state without effecting the undo/redo stack.\n\n```js\neditTodoText = (id, text) => {\n  this.patchState({\n    todos: {\n      [id]: { text: state.todos[id].text },\n    },\n  })\n}\n```\n\nFinally, when the user finishes or blurs the text input, you would call `setState` to create a new command—and in that command, using the `snapshot` info in the command's `before` patch.\n\n```js\nfinishEditing = (id) => {\n  const { state, snapshot } = this\n\n  this.setState({\n    before: {\n      todos: {\n        [id]: { text: snapshot.todos[id].text },\n      },\n    },\n    after: {\n      todos: {\n        [id]: { text: state.todos[id].text },\n      },\n    },\n  })\n}\n```\n\n### Testing\n\nYou can using a library like [jest](https://jestjs.io/) to test your `rko` state. In addition to testing your React components, you can also test your state in isolation.\n\nOne way to test is by importing your `StateManager` sub-class and creating new instances for each test.\n\n```js\n// state.test.js\n\nimport { MyState } from \"./state\"\n\ndescribe(\"My State\", () => {\n  it(\"Increments the count (do, undo and redo)\", () => {\n    const myState = new MyState({ count: 0 })\n    myState.adustCount(1)\n    expect(myState.state.count).toBe(1)\n    myState.undo()\n    expect(myState.state.count).toBe(0)\n    myState.redo()\n    expect(myState.state.count).toBe(1)\n  })\n})\n```\n\nAlternatively, you can import your sub-class instance and use the `reset` method between tests to restore the initial state.\n\n```js\n// state.test.js\n\nimport { myState } from \"./state\"\n\ndescribe(\"My State\", () => {\n  it(\"Increments the count\", () => {\n    myState.adustCount(1)\n    expect(myState.state.count).toBe(1)\n  })\n\n  it(\"Decrements the count\", () => {\n    myState.reset()\n    myState.adustCount(-1)\n    expect(myState.state.count).toBe(-1)\n  })\n})\n```\n\n### Tips\n\nYour `StateManager` sub-class is a regular class, so feel free to extend it with other properties and methods that your methods can rely on. For example, you might want multiple snapshots, a more complex `status`, or asynchronous behaviors.\n\n### Examples\n\n- [Todo List](https://codesandbox.io/s/rko-example-mf9cx)\n- [Tic Tac Toe](https://codesandbox.io/s/tic-tac-toe-j9v1l)\n- [perfect-freehand](https://codesandbox.io/s/github/steveruizok/perfect-freehand/tree/main/packages/dev)\n\n## Support\n\nPlease [open an issue](https://github.com/steveruizok/rko/issues/new) for support.\n\n## Discussion\n\nHave an idea or casual question? Visit the [discussion page](https://github.com/steveruizok/rko/discussions).\n\n## Author\n\n- [@steveruizok](https://twitter.com/steveruizok)\n","_attachments":{},"license":"MIT"}