{"_id":"@anandarizki/use-undo-redo","_rev":"10-74e4fa53004a04755523a987ee197d73","name":"@anandarizki/use-undo-redo","dist-tags":{"latest":"1.0.9"},"versions":{"1.0.0":{"name":"@anandarizki/use-undo-redo","version":"1.0.0","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"url":"https://rizki.id","name":"Ananda Rizki"},"license":"MIT","_id":"@anandarizki/use-undo-redo@1.0.0","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"homepage":"https://github.com/anandarizki/use-undo-redo","dist":{"shasum":"f5ac7ef0917c7f7bdcc9c98e9938140189f05208","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.0.tgz","fileCount":13,"integrity":"sha512-gefzGHv/2kIvy8jo6mhDrmuItF42rGADytPU5YNgoPBXNSFejnL8jo5cNTyb3qkwsSg47XoRpKsNIdMOEEIyuQ==","signatures":[{"sig":"MEUCIQCiqHiMT9ylzZ+WngXFPkWDh96BNDNl/BpAxh39t6ekjQIgPtMIAjO8kNyV3wrUPg19RVyLSN7EIq4sN9HH+gpfh/s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14665},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"830406a76d81c7ce25c0cfb34dfcf10e4f386579","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc -p ."},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"_npmVersion":"10.8.1","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","directories":{},"_nodeVersion":"20.9.0","dependencies":{"react":"^18.3.1","undici":"^6.19.4","lodash.last":"^3.0.0","lodash.isequal":"^4.5.0","lodash.clonedeep":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"csstype":"^3.1.3","typescript":"^5.5.4","@types/react":"^18.3.3","undici-types":"^6.19.4","@types/lodash.last":"^3.0.9","@types/lodash.isequal":"^4.5.8","@types/lodash.clonedeep":"^4.5.9"},"_npmOperationalInternal":{"tmp":"tmp/use-undo-redo_1.0.0_1721807695463_0.2963299818277305","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@anandarizki/use-undo-redo","version":"1.0.1","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"url":"https://rizki.id","name":"Ananda Rizki"},"license":"MIT","_id":"@anandarizki/use-undo-redo@1.0.1","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"homepage":"https://github.com/anandarizki/use-undo-redo","dist":{"shasum":"47bba913edfbf684d8248849995e95471cc00699","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.1.tgz","fileCount":13,"integrity":"sha512-vmdTaCzCoLwo5Y/y5CRjLZSzsGjDI3fEzvnw7VWSEYTB84yNma1UABeHfAP4ksI6yYQwAafTED7V70x6/i7LOQ==","signatures":[{"sig":"MEUCIQCYe3f5wZt/r2Avxl9mgUn2RJOAWWEyOmJyEPGIkEm1ZQIgJ/B6ezahxyYG6qX4FsWj48/8b8a8y8EI18eLwX0S5pg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14697},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"9ee2fa991b4be7f6bbd682caa4061a2e8fa80efd","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc -p ."},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"_npmVersion":"10.8.1","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","directories":{},"_nodeVersion":"20.9.0","dependencies":{"react":"^18.3.1","undici":"^6.19.4","lodash.last":"^3.0.0","lodash.isequal":"^4.5.0","lodash.clonedeep":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"csstype":"^3.1.3","typescript":"^5.5.4","@types/react":"^18.3.3","undici-types":"^6.19.4","@types/lodash.last":"^3.0.9","@types/lodash.isequal":"^4.5.8","@types/lodash.clonedeep":"^4.5.9"},"_npmOperationalInternal":{"tmp":"tmp/use-undo-redo_1.0.1_1721808011187_0.023335045713678504","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@anandarizki/use-undo-redo","version":"1.0.2","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"url":"https://rizki.id","name":"Ananda Rizki"},"license":"MIT","_id":"@anandarizki/use-undo-redo@1.0.2","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"homepage":"https://github.com/anandarizki/use-undo-redo","dist":{"shasum":"8fdccacac85aa2cc81f9546102c15e9321480b9e","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.2.tgz","fileCount":13,"integrity":"sha512-O131PoF5GIr5FLuPCBVsREUJbhnJ59a/b8ZKeoLp9lvU8ii3b1j9vJHUFZwv0ZXSQK0hlF4q6UioTcJqgIwb1A==","signatures":[{"sig":"MEUCIQDrv8ZmiqNvE9v6oCfDUD1+W7tXdZFrt5Nx91xJfBK2TgIgemWsAzrUrUmFu4jL4aLUUCGgdKuSS5tn/woh2qW/aoI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14701},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"28b44afb4243552a7fbd293c4626d3304dd4f248","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc -p ."},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"_npmVersion":"10.8.1","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","directories":{},"_nodeVersion":"20.9.0","dependencies":{"react":"^18.3.1","undici":"^6.19.4","lodash.last":"^3.0.0","lodash.isequal":"^4.5.0","lodash.clonedeep":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"csstype":"^3.1.3","typescript":"^5.5.4","@types/react":"^18.3.3","undici-types":"^6.19.4","@types/lodash.last":"^3.0.9","@types/lodash.isequal":"^4.5.8","@types/lodash.clonedeep":"^4.5.9"},"_npmOperationalInternal":{"tmp":"tmp/use-undo-redo_1.0.2_1721824974202_0.3142490470213215","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@anandarizki/use-undo-redo","version":"1.0.3","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"url":"https://rizki.id","name":"Ananda Rizki"},"license":"MIT","_id":"@anandarizki/use-undo-redo@1.0.3","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"homepage":"https://undoredo.rizki.id","bugs":{"url":"https://github.com/anandarizki/use-undo-redo/issues"},"dist":{"shasum":"190a4e35e77b0c248c96fda94f020b3f61c7a8d5","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.3.tgz","fileCount":4,"integrity":"sha512-Ptqyn19TCMYYPoNxXAhfTc6aNsBlzMDM+xlYpuQsJVolt1Vs+QjljyCroP+whifcyxGH9mxBiya5NufP5xNGXQ==","signatures":[{"sig":"MEQCICObBhS/3m+Nh7vdEIU+1g2KQ7DsU2LTJytlj2Rh5kX1AiB4dN0lgbkNCfPpOrSecW5Tc8vuKf1hPkcaQNIyzhWmig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6372},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"acbf13f77435ebc19dbb5ece433c8a65cefad7af","scripts":{"build":"tsc -p ."},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"repository":{"url":"git+https://github.com/anandarizki/use-undo-redo.git","type":"git"},"_npmVersion":"10.2.4","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","directories":{},"_nodeVersion":"21.6.1","dependencies":{"lodash.last":"^3.0.0","lodash.isequal":"^4.5.0","lodash.clonedeep":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","typescript":"^5.2.2","@types/react":"^18.2.33","@types/lodash.last":"^3.0.9","@types/lodash.isequal":"^4.5.8","@types/lodash.clonedeep":"^4.5.9"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/use-undo-redo_1.0.3_1721937657050_0.6168148362916994","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@anandarizki/use-undo-redo","version":"1.0.4","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"url":"https://rizki.id","name":"Ananda Rizki"},"license":"MIT","_id":"@anandarizki/use-undo-redo@1.0.4","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"homepage":"https://undoredo.rizki.id","bugs":{"url":"https://github.com/anandarizki/use-undo-redo/issues"},"dist":{"shasum":"85272a2b31ee87bb3331bde7a244a75da403d8cf","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.4.tgz","fileCount":13,"integrity":"sha512-Z+oZaACdovE2fAWT2wHPHbsEgxv4mgzJOxS7atqPKyzpueKH+FtpkpEMM3kLH1f1x1WUrPpSMtDGv0eUPeejcg==","signatures":[{"sig":"MEQCIFbMny/jN/TonVcA101BTkYnIH8lIVvsu5TteYEkyqHxAiAXVZuvvoLWPHOlN8+iNCLDJlz0IlUWgBve6TSchYZFIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14370},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"c3e453832ec21b2ecaf5b329188508fcd4c0f34a","scripts":{"build":"tsc -p ."},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"repository":{"url":"git+https://github.com/anandarizki/use-undo-redo.git","type":"git"},"_npmVersion":"10.2.4","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","directories":{},"_nodeVersion":"21.6.1","dependencies":{"lodash.last":"^3.0.0","lodash.isequal":"^4.5.0","lodash.clonedeep":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","typescript":"^5.2.2","@types/react":"^18.2.33","@types/lodash.last":"^3.0.9","@types/lodash.isequal":"^4.5.8","@types/lodash.clonedeep":"^4.5.9"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/use-undo-redo_1.0.4_1721938079662_0.10517837135529695","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@anandarizki/use-undo-redo","version":"1.0.5","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"url":"https://rizki.id","name":"Ananda Rizki"},"license":"MIT","_id":"@anandarizki/use-undo-redo@1.0.5","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"homepage":"https://undoredo.rizki.id","bugs":{"url":"https://github.com/anandarizki/use-undo-redo/issues"},"dist":{"shasum":"662efe1e015aa1e69d5a3fc5eab88b323c8bed74","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.5.tgz","fileCount":5,"integrity":"sha512-vsCsyZDwXzieqlABgaIQjNjzibxlkedFVgke8bgIFALDOBHpZ3aALJqzh/f0M/3ZRvPkRbsTK+kEnKJQtEyexQ==","signatures":[{"sig":"MEUCICcY+zMeiXKyc21Slf7Da2TOIUdyCA7uXiJOS4v82nXuAiEAxmanTWRVZlIQFX8cJg0WEbqsmcFUj+Z61LDuR9QNYHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8779},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"a83b3a4815e378e13862abb88e73170dd7c51055","scripts":{"build":"tsc -p ."},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"repository":{"url":"git+https://github.com/anandarizki/use-undo-redo.git","type":"git"},"_npmVersion":"10.2.4","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","directories":{},"_nodeVersion":"21.6.1","dependencies":{"lodash.last":"^3.0.0","lodash.isequal":"^4.5.0","lodash.clonedeep":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","typescript":"^5.2.2","@types/react":"^18.2.33","@types/lodash.last":"^3.0.9","@types/lodash.isequal":"^4.5.8","@types/lodash.clonedeep":"^4.5.9"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/use-undo-redo_1.0.5_1721939160742_0.20719224413303405","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@anandarizki/use-undo-redo","version":"1.0.6","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"url":"https://rizki.id","name":"Ananda Rizki"},"license":"MIT","_id":"@anandarizki/use-undo-redo@1.0.6","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"homepage":"https://undoredo.rizki.id","bugs":{"url":"https://github.com/anandarizki/use-undo-redo/issues"},"dist":{"shasum":"0da6ca529a918810972441da399a70fbd5101f3c","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.6.tgz","fileCount":7,"integrity":"sha512-W9hj0GhznQwqXpNkv0sKK8Zy1vMM1aVo6TXbuiI7yB14peRVpgwbZcJrJPFFOsiYfBF+UhwGTkS1Bq1guJwwFg==","signatures":[{"sig":"MEUCIGxd8DP9Czo7OMRgrSYxNOGJj6cBzocASdr+b9oUleP6AiEA9NtkDWYhj/KupW5cltixu+2zH7KjyF2hrFE8kPboHyk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9333},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"57bb3df15b00f43b1e5e250d2a4870c59635287b","scripts":{"build":"tsc -p ."},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"repository":{"url":"git+https://github.com/anandarizki/use-undo-redo.git","type":"git"},"_npmVersion":"10.2.4","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","directories":{},"_nodeVersion":"21.6.1","dependencies":{"lodash.last":"^3.0.0","lodash.isequal":"^4.5.0","lodash.clonedeep":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","typescript":"^5.2.2","@types/react":"^18.2.33","@types/lodash.last":"^3.0.9","@types/lodash.isequal":"^4.5.8","@types/lodash.clonedeep":"^4.5.9"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/use-undo-redo_1.0.6_1721939309191_0.3221354474833147","host":"s3://npm-registry-packages"}},"1.0.7":{"name":"@anandarizki/use-undo-redo","version":"1.0.7","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"url":"https://rizki.id","name":"Ananda Rizki"},"license":"MIT","_id":"@anandarizki/use-undo-redo@1.0.7","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"homepage":"https://undoredo.rizki.id","bugs":{"url":"https://github.com/anandarizki/use-undo-redo/issues"},"dist":{"shasum":"0764e5b52ec70cdd820d2308844e3a74d81a7034","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.7.tgz","fileCount":7,"integrity":"sha512-tkiRQg8sNDTGj8yaAOWLp3fkaQdK8TCN8u5Amm/im6llEiMhD7+4WSw7qRPx5tpQ9s5xWTd2i+mLXNPvUQuZuA==","signatures":[{"sig":"MEUCIQDKcfYNQC5wOOcWW2TT/bC7TzlAJL4uXHdi03w5WLhlMQIgK9OfesoyhaJmdvAjaMseAwx5cVzSPS0J4oYtYRD1+dI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9385},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"d089d3f33c575582c3a38e37ed1a836db8f34824","scripts":{"build":"tsc -p ."},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"repository":{"url":"git+https://github.com/anandarizki/use-undo-redo.git","type":"git"},"_npmVersion":"10.2.4","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","directories":{},"_nodeVersion":"21.6.1","dependencies":{"lodash.last":"^3.0.0","lodash.isequal":"^4.5.0","lodash.clonedeep":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","typescript":"^5.2.2","@types/react":"^18.2.33","@types/lodash.last":"^3.0.9","@types/lodash.isequal":"^4.5.8","@types/lodash.clonedeep":"^4.5.9"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/use-undo-redo_1.0.7_1721948019298_0.7015702915688147","host":"s3://npm-registry-packages"}},"1.0.8":{"name":"@anandarizki/use-undo-redo","version":"1.0.8","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"url":"https://rizki.id","name":"Ananda Rizki"},"license":"MIT","_id":"@anandarizki/use-undo-redo@1.0.8","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"homepage":"https://undoredo.rizki.id","bugs":{"url":"https://github.com/anandarizki/use-undo-redo/issues"},"dist":{"shasum":"938b84fa6f4aedaa3c25be387f6ea2b743dd37e0","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.8.tgz","fileCount":3,"integrity":"sha512-caoBurAw7RWs01bHlZD5qLdunKWWMNoIDVSMmwenEVKWJ2XAXG3VHJVSWFqeFDNmUZuBriGMo8WXloxDOw2auQ==","signatures":[{"sig":"MEUCIQCnxW6X8vYWDi50DqGgq7cQQjU7EI4lPbL1xTOO0xrf4wIgGHrtKr/YCCedC/NJaeT5PZWsTl+8uankkHJFZmBHQyA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6117},"main":"dist/index.js","gitHead":"e410cf8d3385771da7c602bdf8b848970696125a","scripts":{"build":"tsc -p ."},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"repository":{"url":"git+https://github.com/anandarizki/use-undo-redo.git","type":"git"},"_npmVersion":"11.5.1","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","directories":{},"_nodeVersion":"24.7.0","dependencies":{"lodash.last":"^3.0.0","lodash.isequal":"^4.5.0","lodash.clonedeep":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","typescript":"^5.2.2","@types/react":"^18.2.33","@types/lodash.last":"^3.0.9","@types/lodash.isequal":"^4.5.8","@types/lodash.clonedeep":"^4.5.9"},"peerDependencies":{"react":">=18.2.0 <20"},"_npmOperationalInternal":{"tmp":"tmp/use-undo-redo_1.0.8_1758352336870_0.6882536956789971","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@anandarizki/use-undo-redo","version":"1.0.9","main":"dist/index.js","homepage":"https://undoredo.rizki.id","repository":{"type":"git","url":"git+https://github.com/anandarizki/use-undo-redo.git"},"scripts":{"build":"tsc -p ."},"keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"author":{"name":"Ananda Rizki","url":"https://rizki.id"},"license":"MIT","description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","dependencies":{"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","lodash.last":"^3.0.0"},"devDependencies":{"@types/lodash.clonedeep":"^4.5.9","@types/lodash.isequal":"^4.5.8","@types/lodash.last":"^3.0.9","@types/react":"^19.1.13","react":"^19.1.1","typescript":"^5.2.2"},"peerDependencies":{"react":">=18.2.0 <20"},"_id":"@anandarizki/use-undo-redo@1.0.9","gitHead":"e410cf8d3385771da7c602bdf8b848970696125a","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/anandarizki/use-undo-redo/issues"},"_nodeVersion":"24.7.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-OP+GFEWk3Hzf/80Zgr8Ujn6mjeQ97kU6F9peHPTapkxUp5RtSc4934wHOqhZqIxPAm8LLGl/aJRdKxM0/k1Qaw==","shasum":"0f92e5a3f3b617a11494f447071a5302b740ce49","tarball":"https://registry.npmjs.org/@anandarizki/use-undo-redo/-/use-undo-redo-1.0.9.tgz","fileCount":7,"unpackedSize":9390,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBSosZqz6Vl+ekz6N+9C/TWzCVfk8ZBQT06qccOHFsuUAiEAx4ZtZu1ELa9mP6mj5Cq+w2nJLwBoRBIlhBQBKWDeD/o="}]},"_npmUser":{"name":"anandarizki","email":"neosheet@gmail.com"},"directories":{},"maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/use-undo-redo_1.0.9_1758353200738_0.9890768856610035"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-24T07:54:55.321Z","modified":"2025-09-20T07:26:41.112Z","1.0.0":"2024-07-24T07:54:55.599Z","1.0.1":"2024-07-24T08:00:11.442Z","1.0.2":"2024-07-24T12:42:54.339Z","1.0.3":"2024-07-25T20:00:57.203Z","1.0.4":"2024-07-25T20:07:59.797Z","1.0.5":"2024-07-25T20:26:00.883Z","1.0.6":"2024-07-25T20:28:29.375Z","1.0.7":"2024-07-25T22:53:39.478Z","1.0.8":"2025-09-20T07:12:17.062Z","1.0.9":"2025-09-20T07:26:40.923Z"},"bugs":{"url":"https://github.com/anandarizki/use-undo-redo/issues"},"author":{"name":"Ananda Rizki","url":"https://rizki.id"},"license":"MIT","homepage":"https://undoredo.rizki.id","keywords":["react","hook","useUndoRedo","undo","redo","state management","history","time travel","debounce","state","react-hooks","history stack","state history","undo-redo","react state","state management library","state management hook","react state management","javascript","typescript"],"repository":{"type":"git","url":"git+https://github.com/anandarizki/use-undo-redo.git"},"description":"A hook provides a simple and efficient way to manage undo and redo functionality in your React applications","maintainers":[{"name":"anandarizki","email":"neosheet@gmail.com"}],"readme":"# use-undo-redo\n\nThe `useUndoRedo` hook provides a simple and efficient way to manage undo and redo functionality in your React applications. It helps you maintain a history of state changes, allowing users to seamlessly navigate through different states of your application. \n## Compatiblity\n`\"react\": \"^18.2.0\"`\n## Demo\nhttps://undoredo.rizki.id\n\n## Features\n\n- **Undo and Redo**: Effortlessly navigate backward and forward through the state history.\n- **Configurable History Capacity**: Define the maximum number of state changes to keep in memory.\n- **Debounce Support**: Optimize performance by controlling the frequency of state history updates.\n- **History Management**: Access the full history stack, reset the history, or jump to a specific point.\n- **Lightweight and Easy to Integrate**: Minimal setup required to integrate into existing React components.\n\n## Installation\n\n```node\nnpm i @anandarizki/use-undo-redo\n```\n\n## Basic Usage\n\n```js\n//import the hook\nimport { useUndoRedo } from \"@anandarizki/use-undo-redo\";\n\n//your state handler\nconst [state, setState] = useState();\n\n//initialize hooks and pass your state and setState as the argument\nconst [undo, redo] = useUndoRedo([state, setState]);\n```\n\n### Integrating into an Existing Component\n\nYou don't need to overhaul your existing state management. This hook can be seamlessly integrated into your code with just a single line addition.\n\n**Original component**\n\n```jsx\nimport { useState } from \"react\";\n\nfunction MyComponent() {\n  const [count, setCount] = useState(0);\n\n  return (\n    <div>\n      <div>\n        <button onClick={() => setCount(count - 1)}>-</button>\n        {count}\n        <button onClick={() => setCount(count + 1)}>+</button>\n      </div>\n    </div>\n  );\n}\n```\n\n**Component with `useUndoRedo`**\n\n```jsx\nimport { useState } from \"react\";\nimport { useUndoRedo } from \"@anandarizki/use-undo-redo\";\n\nfunction MyComponent() {\n  const [count, setCount] = useState(0);\n\n  //new line\n  const [undo, redo] = useUndoRedo([count, setCount]);\n\n  return (\n    <div>\n      <div>\n        <button onClick={() => setCount(count - 1)}>-</button>\n        {count}\n        <button onClick={() => setCount(count + 1)}>+</button>\n      </div>\n\n      <div>\n        <button onClick={undo}>\n          Undo\n        </button>\n        <button onClick={redo}>\n          Redo\n        </button>\n      </div>\n    </div>\n  );\n}\n```\n\n## useUndoRedo\n\n```ts\nuseUndoRedo<T>(primaryState: [T, (v: T) => void], options?: Options): Output<T>\n```\n- **primaryState**: An array containing the state value and the state setter function. This allows the hook to manage the history of this specific state.\n\n- **options**: \n    - **capacity** (optional): The maximum number of state changes to keep in history. Default is 10.\n    - **debounce** (optional): The time in milliseconds to debounce history updates. It useful when your state update frequently, ie. when updating state using controlled input. Default is 0 (no debounce).\n\n- **Returns**: An array containing:\n    - **undo**: A function to revert to the previous state.\n    - **redo**: A function to move forward to the next state.\n    - **An object with the following properties**:\n        - **canUndo**: A boolean indicating if an undo operation is possible.\n        - **canRedo**: A boolean indicating if a redo operation is possible.\n        - **reset**: A function to clear the history and reset the pointer.\n        - **history**: An array representing the current state history.\njumpTo: A function to jump to a specific point in the history by index.\n\n**Full usage**\n\n```js\nconst [undo, redo, { canUndo, canRedo, jumpTo, history, pointer, reset }] =\n  useUndoRedo([state, setState], {\n    debounce: 500,\n    capacity: 20,\n  });\n```\n","readmeFilename":"README.md"}