{"_id":"@biswaviraj/time-travel","_rev":"11-1a563d88edf7d6f0ed87ff1064772cc6","name":"@biswaviraj/time-travel","dist-tags":{"latest":"3.2.0"},"versions":{"1.0.0":{"name":"@biswaviraj/time-travel","version":"1.0.0","keywords":["undo","redo","history","time travel","time-travel","state history","rollback"],"author":{"name":"BiswaViraj"},"license":"ISC","_id":"@biswaviraj/time-travel@1.0.0","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"homepage":"https://github.com/BiswaViraj/undo-redo#readme","bugs":{"url":"https://github.com/BiswaViraj/undo-redo/issues"},"dist":{"shasum":"8dbd14be5cc221b29f167490ca4848904af53ec4","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-1.0.0.tgz","fileCount":7,"integrity":"sha512-5j+yOEQgIIYConrdqgwqpmMjP+lSxBbxdyCx+x+OWfiOFQ2q8Iva/tbaVa2/xNQsBmswkgsnsEa4CPcCFiDzXA==","signatures":[{"sig":"MEQCICQuqf5I5TxuZbzm8PnViwrZSUebOXI2KMhVIrwz/AzEAiBUkq/zKfdbuiTNrjZuW6Aju4FYw9aRyn2nYtr1+tZihg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiCRv8CRA9TVsSAnZWagAArWgP/3CbB0Q5SunV0WW2fiAm\nxY0Z4z8G5JYEYqPX0vH2tGRw6EWIybdHpYLL2HwnesN213OJrpVRE8kLYQ45\n4P1/INGHyNBjECV+hP4LMsXPh3JweDrFpb2oumWMTc/d+JYSeG4Yk+52Coyr\nxFLZmphNsnq1eiETc39b8TZGN61xnTPn5FCNDKpBixAMwdM35sSPbGZa4JYM\nkelwuWYsH0MRLKmhJo+ivNxNI07YSN1PJAbPUv0XxG5NuWhP9FzNe5a6i/lS\neLJlOqIfuMPKWSZoz0GLjTgvTHKiBb3O6goJmTR2c35cdrMGW7cXA2rU0rnU\nB5YSLpaNhvw/k18JLioLy8WsxoPd9fyjsoaAe2zeZx1AVNq4fcmzRDTiUgk8\n2o5LAOXXI+ov9hY/69HGs+15uk5Y8bg7mk/4K5qN/R4HqFJIas3BbIVwD6qP\nFuLPvTB8gPtNWAGMoJ00swsegKAhHqDNX0Ld3Wr0kH6jj/hi7F++2z+0RL1X\nX5l5y1qjHVFDXGye6XSfxQz29f3JcvqwieHvVic6bm3SEijeOrw4G0Y5hBd6\n16SPHN0sjDu9QpPAgRq+cCafZSHdNsXLK3nhTNKhCVIiN06WYrVQ+anyfJLh\nkqi8Y55AMkBlombc78hCHfitb8iYf7VALLzuCc13g4MZiMfo7A2VS946uA0e\n/aA3\r\n=nsMH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"8570be3d1e41543759b15892e18a2092de619a03","scripts":{"lint":"eslint . --ext .ts","build":"npx tsc","start":"tsc && node dist/index.js"},"_npmUser":{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"},"repository":{"url":"git+https://github.com/BiswaViraj/undo-redo.git","type":"git"},"_npmVersion":"6.14.15","description":"Simple lightweight undo redo package","directories":{},"_nodeVersion":"14.18.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.9.0","typescript":"^4.5.5","@typescript-eslint/parser":"^5.11.0","@typescript-eslint/eslint-plugin":"^5.11.0"},"_npmOperationalInternal":{"tmp":"tmp/time-travel_1.0.0_1644764156231_0.27895198853214653","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@biswaviraj/time-travel","version":"2.0.0","keywords":["undo","redo","history","time travel","time-travel","state history","rollback"],"author":{"name":"BiswaViraj"},"license":"ISC","_id":"@biswaviraj/time-travel@2.0.0","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"homepage":"https://github.com/BiswaViraj/undo-redo#readme","bugs":{"url":"https://github.com/BiswaViraj/undo-redo/issues"},"dist":{"shasum":"919507c2bdd65143d9a31001c1333f6e6342bbc3","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-2.0.0.tgz","fileCount":11,"integrity":"sha512-orwgce/1ds8k2jmzUsDNUKJ49Zgmj4lUYJvNMIfVwa1MmBfcQmssOAImdktYQFmrwixqTu8zSxox2o1c1p6xRQ==","signatures":[{"sig":"MEYCIQDclOgwuS+5q4msdkXmkOVVMb/pYRZHF1csCdj3G2+tcgIhAN2GL0B0vWjJGmbQKlWwZYLEPTLfc6nB9nQW2D1UoyIL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5945},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"324bb991dd09240a559eac716d03b9600cdf95e7","scripts":{"lint":"eslint . --ext .ts","build":"tsup","start":"tsc && node dist/index.js"},"_npmUser":{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"},"repository":{"url":"git+https://github.com/BiswaViraj/undo-redo.git","type":"git"},"_npmVersion":"10.5.0","description":"Simple lightweight undo redo package","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","eslint":"^9.9.0","typescript":"^5.5.4","@typescript-eslint/parser":"^8.0.1","@typescript-eslint/eslint-plugin":"^8.0.1"},"_npmOperationalInternal":{"tmp":"tmp/time-travel_2.0.0_1723294594168_0.04906290144509384","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@biswaviraj/time-travel","version":"2.0.1","keywords":["undo","redo","history","time travel","time-travel","state history","rollback"],"author":{"name":"BiswaViraj"},"license":"ISC","_id":"@biswaviraj/time-travel@2.0.1","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"homepage":"https://github.com/BiswaViraj/undo-redo#readme","bugs":{"url":"https://github.com/BiswaViraj/undo-redo/issues"},"dist":{"shasum":"6a960d62ddc20df1cec16af6450af8e2897d6609","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-2.0.1.tgz","fileCount":11,"integrity":"sha512-L1g8H2nQlJ5JoZ7e2nRLai6Nu0O/caxzaf21NcJitXIAiN9RC1scSkeR5RLqxz1Kpv/3vEIFuSTbvoomhd7wqQ==","signatures":[{"sig":"MEQCIDRMVFz8IVOXY7EF6ZJ5Y1+h/rrw8PviTMboSefjBq0dAiA73ljv7zB3MOj0vB5PFTvfvtTrZ3rH2urO0biqL/Tr/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5901},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"d9ad3b8db128c0b8750bd5ef4cad3372594a2b4a","scripts":{"lint":"eslint . --ext .ts","build":"tsup","start":"tsc && node dist/index.js"},"_npmUser":{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"},"repository":{"url":"git+https://github.com/BiswaViraj/undo-redo.git","type":"git"},"_npmVersion":"10.5.0","description":"Simple lightweight undo redo package","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","eslint":"^9.9.0","typescript":"^5.5.4","@typescript-eslint/parser":"^8.0.1","@typescript-eslint/eslint-plugin":"^8.0.1"},"_npmOperationalInternal":{"tmp":"tmp/time-travel_2.0.1_1723295298148_0.2912227906732292","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"@biswaviraj/time-travel","version":"2.0.2","keywords":["undo","redo","history","time travel","time-travel","state history","rollback"],"author":{"name":"BiswaViraj"},"license":"ISC","_id":"@biswaviraj/time-travel@2.0.2","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"homepage":"https://github.com/BiswaViraj/undo-redo#readme","bugs":{"url":"https://github.com/BiswaViraj/undo-redo/issues"},"dist":{"shasum":"2edb619c6784874bdad75f0fc8fcb347b17d341c","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-2.0.2.tgz","fileCount":11,"integrity":"sha512-4H/QpmNIjKvLQYm+DDW+64O571MAunTqBqW0cojldvCtre9JPiFny5tIoWQlr/njtSdPSUsO14sV0dOeUmwWtg==","signatures":[{"sig":"MEUCIHTAiGhZkloFBZLwB/30Xfh5vS4MxdXgrwojikcbWXHWAiEA6GFPSnTQ/8yfGPFHBWmWyd28rb92RZsnxR0PZue7o90=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9696},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"d060732e050dc530fdbd073d9ce067ee48654284","scripts":{"lint":"eslint . --ext .ts","build":"tsup","start":"tsc && node dist/index.js"},"_npmUser":{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"},"repository":{"url":"git+https://github.com/BiswaViraj/undo-redo.git","type":"git"},"_npmVersion":"10.5.0","description":"Simple lightweight undo redo package","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","eslint":"^9.9.0","typescript":"^5.5.4","@typescript-eslint/parser":"^8.0.1","@typescript-eslint/eslint-plugin":"^8.0.1"},"_npmOperationalInternal":{"tmp":"tmp/time-travel_2.0.2_1723296802240_0.9692105675893143","host":"s3://npm-registry-packages"}},"2.0.3":{"name":"@biswaviraj/time-travel","version":"2.0.3","keywords":["undo","redo","history","time travel","time-travel","state history","rollback"],"author":{"name":"BiswaViraj"},"license":"ISC","_id":"@biswaviraj/time-travel@2.0.3","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"homepage":"https://github.com/BiswaViraj/undo-redo#readme","bugs":{"url":"https://github.com/BiswaViraj/undo-redo/issues"},"dist":{"shasum":"e4d074a24a88cf985e72ea8d3adea77da9753ed7","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-2.0.3.tgz","fileCount":11,"integrity":"sha512-b3ixXjygYc0ET+Mq1DcvA2q6+Hhrg1V8nXPT9QNeeJmEvuA0ZzhACAS5UqZH+Pk5RzdqWp2o0K5U7NKy6sJnrg==","signatures":[{"sig":"MEUCIQCMQiifajvUU2DeIJ8zKAVNhBTx34RKVEF73BQYLaTfggIgQ22yH913w/LOOPz1ZnG+qW4gYTbRIEf7vXhqfZDrAn4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9732},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"a0fc125d2e26e93ddc3640a6c2acb88742e4f3c9","scripts":{"lint":"eslint . --ext .ts","build":"tsup","start":"tsc && node dist/index.js"},"_npmUser":{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"},"repository":{"url":"git+https://github.com/BiswaViraj/undo-redo.git","type":"git"},"_npmVersion":"10.5.0","description":"Simple lightweight undo redo package","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","eslint":"^9.9.0","typescript":"^5.5.4","@typescript-eslint/parser":"^8.0.1","@typescript-eslint/eslint-plugin":"^8.0.1"},"_npmOperationalInternal":{"tmp":"tmp/time-travel_2.0.3_1723297332002_0.10801234002396698","host":"s3://npm-registry-packages"}},"2.0.4":{"name":"@biswaviraj/time-travel","version":"2.0.4","keywords":["undo","redo","history","time travel","time-travel","state history","rollback"],"author":{"name":"BiswaViraj"},"license":"ISC","_id":"@biswaviraj/time-travel@2.0.4","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"homepage":"https://github.com/BiswaViraj/undo-redo#readme","bugs":{"url":"https://github.com/BiswaViraj/undo-redo/issues"},"dist":{"shasum":"1288f14a514db35033cc0b77d3a3f2d6647e92b5","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-2.0.4.tgz","fileCount":11,"integrity":"sha512-at69rp+IJ/gWf2enf6OJQNFlDNeuPt2PMUaf+OelxyAeI1wCAFAvoupeHI7SLYKSfW5cy0sOjjjVeZ7R0zvMVw==","signatures":[{"sig":"MEQCIC0ukIENaVMOtkihaJAvdxN9JcDsPH8GtM+OUpoLtIAKAiAm1aUg8yC26hgOBmyEHcZAFDwoTZAxwqS7GwNQz/wHxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9856},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"90662e4f885e51b469909b98b0894daf8e18be59","scripts":{"lint":"eslint . --ext .ts","build":"tsup","start":"tsc && node dist/index.js"},"_npmUser":{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"},"repository":{"url":"git+https://github.com/BiswaViraj/undo-redo.git","type":"git"},"_npmVersion":"10.5.0","description":"Simple lightweight undo redo package","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","eslint":"^9.9.0","typescript":"^5.5.4","@typescript-eslint/parser":"^8.0.1","@typescript-eslint/eslint-plugin":"^8.0.1"},"_npmOperationalInternal":{"tmp":"tmp/time-travel_2.0.4_1723302614818_0.3644240687301179","host":"s3://npm-registry-packages"}},"2.0.5":{"name":"@biswaviraj/time-travel","version":"2.0.5","keywords":["undo","redo","history","time travel","time-travel","state history","rollback"],"author":{"name":"BiswaViraj"},"license":"ISC","_id":"@biswaviraj/time-travel@2.0.5","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"homepage":"https://github.com/BiswaViraj/time-travel#readme","bugs":{"url":"https://github.com/BiswaViraj/time-travel/issues"},"dist":{"shasum":"1dfc78b495562129609e183a926fb137039711f3","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-2.0.5.tgz","fileCount":11,"integrity":"sha512-DpiIvPih0hUYhg4FJ0FRfRXw6pCVkQsMa8naF24NSHLvMlqwK/P/T78/mfnpBuCG8xSZNnNJdlb7bztyXzeq+g==","signatures":[{"sig":"MEYCIQDBKLAX2TCENKCGno31iBDnozPvNKFVw7E009T0a1CTIgIhAK1jRU/bbYLHaURPsr2FGqhQNjYthoHe5BBc3EPPVxjT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10037},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"b45158badeeca4407ea177c487ed1cff171ec3d1","scripts":{"lint":"eslint . --ext .ts","build":"tsup","start":"tsc && node dist/index.js"},"_npmUser":{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"},"repository":{"url":"git+https://github.com/BiswaViraj/time-travel.git","type":"git"},"_npmVersion":"10.5.0","description":"Simple and lightweight undo redo package","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","eslint":"^9.9.0","typescript":"^5.5.4","@typescript-eslint/parser":"^8.0.1","@typescript-eslint/eslint-plugin":"^8.0.1"},"_npmOperationalInternal":{"tmp":"tmp/time-travel_2.0.5_1723359486120_0.07151132652235814","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@biswaviraj/time-travel","version":"3.0.0","keywords":["undo","redo","history","time travel","time-travel","state history","rollback"],"author":{"name":"BiswaViraj"},"license":"ISC","_id":"@biswaviraj/time-travel@3.0.0","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"homepage":"https://github.com/BiswaViraj/time-travel#readme","bugs":{"url":"https://github.com/BiswaViraj/time-travel/issues"},"dist":{"shasum":"152dfeebce45420bc5529eb39997958c2553509c","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-3.0.0.tgz","fileCount":13,"integrity":"sha512-HwynBmBedNkXvtJTlBUWanuaTB2nCO4yMNtMyE5UtbAGRdouTgdtstE+GQ5dqYt3CTrblqO1NZHdoeV9BYuaWw==","signatures":[{"sig":"MEQCIGXB86ApEC2SYc1/aJZkWDhdboFepXGO/YNRvSBe8gssAiAEw4dJQDVaM4Gb/kNNeVoOMsLoqpVYSmitV+Rq888oFw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39892},"main":"./dist/index.js","_from":"file:biswaviraj-time-travel-3.0.0.tgz","types":"./dist/index.d.ts","unpkg":"./dist/index.iife.js","module":"./dist/index.mjs","browser":"./dist/index.mjs","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"lint":"eslint . --ext .ts","test":"vitest run","build":"tsdown","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsdown --watch"},"_npmUser":{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"},"jsdelivr":"./dist/index.iife.js","_resolved":"/private/var/folders/b0/1hv92cp96ls05d2rwzdx_gzr0000gn/T/16ce5c38bf4fb6ea44e3be1527e5b7b3/biswaviraj-time-travel-3.0.0.tgz","_integrity":"sha512-HwynBmBedNkXvtJTlBUWanuaTB2nCO4yMNtMyE5UtbAGRdouTgdtstE+GQ5dqYt3CTrblqO1NZHdoeV9BYuaWw==","repository":{"url":"git+https://github.com/BiswaViraj/time-travel.git","type":"git"},"_npmVersion":"11.11.0","description":"Simple and lightweight undo redo package","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","react-native":"./dist/index.mjs","_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.9.0","tsdown":"^0.21.6","vitest":"^4.1.2","typescript":"^5.5.4","@typescript-eslint/parser":"^8.0.1","@typescript-eslint/eslint-plugin":"^8.0.1"},"_npmOperationalInternal":{"tmp":"tmp/time-travel_3.0.0_1774710101474_0.09558633640398884","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@biswaviraj/time-travel","version":"3.1.0","keywords":["undo","redo","history","time travel","time-travel","state history","rollback","react","react-hooks","useTimeTravel"],"author":{"name":"BiswaViraj"},"license":"ISC","_id":"@biswaviraj/time-travel@3.1.0","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"homepage":"https://github.com/BiswaViraj/time-travel#readme","bugs":{"url":"https://github.com/BiswaViraj/time-travel/issues"},"dist":{"shasum":"2eae6d9694284a68635681ad9dd28258a8cc9850","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-3.1.0.tgz","fileCount":25,"integrity":"sha512-eCqNxFks0pIHHm2jio1GMNZ6sEu7mD/ueBBE1KvVwOZT4F6252VS2O3KoQl5jQWUn+2vPHP+J9QCFS/kZdvz5w==","signatures":[{"sig":"MEQCIH78E23htZnClIOhr8xzbqBf8lOuXHAy1wPtx/C9rIMmAiBqA2hwE0XoYOSsSvilKGtJhh7Mkb31GpLRmghpDpG30A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@biswaviraj%2ftime-travel@3.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47743},"main":"./dist/index.js","pnpm":{"onlyBuiltDependencies":["lefthook"]},"types":"./dist/index.d.ts","unpkg":"./dist/index.iife.js","module":"./dist/index.mjs","browser":"./dist/index.mjs","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.mjs","default":"./dist/react.mjs","require":"./dist/react.js"},"./package.json":"./package.json"},"gitHead":"c4c3b30a94ad3de7e714e695ad57201a0b8c23a1","scripts":{"lint":"biome check src/","test":"vitest run","build":"tsdown","format":"biome format src/","lint:fix":"biome check --write src/","typecheck":"tsc --noEmit","format:fix":"biome format --write src/","test:watch":"vitest","build:watch":"tsdown --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f7f88894-9e6a-416e-a094-a3739cf7ed2d"}},"jsdelivr":"./dist/index.iife.js","repository":{"url":"git+https://github.com/BiswaViraj/time-travel.git","type":"git"},"_npmVersion":"11.12.1","description":"Simple and lightweight undo redo package","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","react-native":"./dist/index.mjs","_hasShrinkwrap":false,"packageManager":"pnpm@10.32.1","devDependencies":{"jsdom":"^29.0.1","react":"^19.2.4","tsdown":"^0.21.6","vitest":"^4.1.2","lefthook":"^2.1.4","react-dom":"^19.2.4","typescript":"^5.5.4","@types/react":"^19.2.14","@biomejs/biome":"2.4.9","@commitlint/cli":"^20.5.0","@types/react-dom":"^19.2.3","@testing-library/react":"^16.3.2","@commitlint/config-conventional":"^20.5.0"},"peerDependencies":{"react":">=18"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/time-travel_3.1.0_1774796860596_0.356638496186537","host":"s3://npm-registry-packages-npm-production"}},"3.2.0":{"author":{"name":"BiswaViraj"},"browser":"./dist/index.mjs","bugs":{"url":"https://github.com/BiswaViraj/time-travel/issues"},"description":"Simple and lightweight undo redo package","devDependencies":{"@testing-library/react":"^16.3.2","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","jsdom":"^29.0.1","react":"^19.2.4","react-dom":"^19.2.4","tsdown":"^0.21.6","typescript":"^5.5.4","vitest":"^4.1.2"},"engines":{"node":">=20.19.0"},"exports":{".":{"default":"./dist/index.mjs","import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts"},"./package.json":"./package.json","./react":{"default":"./dist/react.mjs","import":"./dist/react.mjs","require":"./dist/react.js","types":"./dist/react.d.ts"}},"homepage":"https://github.com/BiswaViraj/time-travel#readme","jsdelivr":"./dist/index.iife.js","keywords":["undo","redo","history","time travel","time-travel","state history","rollback","react","react-hooks","useTimeTravel"],"license":"ISC","main":"./dist/index.js","module":"./dist/index.mjs","name":"@biswaviraj/time-travel","peerDependencies":{"react":">=18"},"peerDependenciesMeta":{"react":{"optional":true}},"react-native":"./dist/index.mjs","repository":{"directory":"packages/time-travel","type":"git","url":"git+https://github.com/BiswaViraj/time-travel.git"},"scripts":{"build":"tsdown","build:watch":"tsdown --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit"},"sideEffects":false,"types":"./dist/index.d.ts","unpkg":"./dist/index.iife.js","version":"3.2.0","gitHead":"0c5505061f7879a412ca7a65a8d4be5eaf1c3c33","_id":"@biswaviraj/time-travel@3.2.0","_nodeVersion":"24.14.1","_npmVersion":"11.12.1","dist":{"integrity":"sha512-+KfmTzbI3krJ3DgpHNxbFrM9/lxMZP2+z1+YiRsRa4RamBc8vm7kPjjLJtl1xHAsUbHlfVNwZv5h9Cb2Wafrhw==","shasum":"c0b926a0baca953257f5bcd903a159d5d35e3c67","tarball":"https://registry.npmjs.org/@biswaviraj/time-travel/-/time-travel-3.2.0.tgz","fileCount":25,"unpackedSize":47402,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@biswaviraj%2ftime-travel@3.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBtYAO7JWxA1owyVdZiulrelOJqGKOIwp6nBR1WChFHvAiEAiuGtt4EGokechYdUr+g6Q/oXhz9DnkluJEa3r0OXl4M="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f7f88894-9e6a-416e-a094-a3739cf7ed2d"}},"directories":{},"maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/time-travel_3.2.0_1775498167017_0.4189861106072048"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-13T14:55:56.181Z","modified":"2026-04-06T17:56:07.577Z","1.0.0":"2022-02-13T14:55:56.410Z","2.0.0":"2024-08-10T12:56:34.344Z","2.0.1":"2024-08-10T13:08:18.419Z","2.0.2":"2024-08-10T13:33:22.394Z","2.0.3":"2024-08-10T13:42:12.150Z","2.0.4":"2024-08-10T15:10:15.040Z","2.0.5":"2024-08-11T06:58:06.273Z","3.0.0":"2026-03-28T15:01:41.628Z","3.1.0":"2026-03-29T15:07:40.756Z","3.2.0":"2026-04-06T17:56:07.192Z"},"bugs":{"url":"https://github.com/BiswaViraj/time-travel/issues"},"author":{"name":"BiswaViraj"},"license":"ISC","homepage":"https://github.com/BiswaViraj/time-travel#readme","keywords":["undo","redo","history","time travel","time-travel","state history","rollback","react","react-hooks","useTimeTravel"],"repository":{"directory":"packages/time-travel","type":"git","url":"git+https://github.com/BiswaViraj/time-travel.git"},"description":"Simple and lightweight undo redo package","maintainers":[{"name":"biswaviraj","email":"biswajeetdas18@gmail.com"}],"readme":"# Time Travel\n\nSimple and lightweight undo/redo state management for any JavaScript or TypeScript project.\n\n[![npm version](https://img.shields.io/npm/v/@biswaviraj/time-travel)](https://www.npmjs.com/package/@biswaviraj/time-travel)\n![Minified + Gzipped size](https://badgen.net/bundlephobia/minzip/@biswaviraj/time-travel)\n![Minified size](https://badgen.net/bundlephobia/min/@biswaviraj/time-travel)\n\n## Installation\n\n```bash\nnpm install @biswaviraj/time-travel\n# or\npnpm add @biswaviraj/time-travel\n```\n\n## Quick Start\n\n```typescript\nimport { timeTravel } from \"@biswaviraj/time-travel\";\n\nconst tt = timeTravel<number>(0);\n\ntt.add(1);\ntt.add(2);\ntt.add(3);\n\ntt.get();    // 3\ntt.undo();   // returns 2\ntt.undo();   // returns 1\ntt.redo();   // returns 2\n\ntt.canUndo;  // true\ntt.canRedo;  // true\ntt.size;     // { past: 1, future: 1 }\n```\n\n## Features\n\n- **Undo/Redo** with return values\n- **History navigation** — jump N steps with `go(n)`\n- **Batch operations** — add multiple states at once with `addMany()`\n- **Introspection** — `canUndo`, `canRedo`, `size`, `getHistory()`\n- **Opt-in reactivity** — `subscribe()` for state change notifications\n- **Configurable history limit** to control memory usage\n- **Zero dependencies**, fully typed\n- **React hook** — `useTimeTravel` for reactive undo/redo in React components\n\n## Usage\n\n### Basic\n\n```typescript\nimport { timeTravel } from \"@biswaviraj/time-travel\";\n\nconst tt = timeTravel<string>(\"hello\", { limit: 20 });\n\ntt.add(\"world\");\ntt.get(); // \"world\"\n\ntt.undo(); // returns \"hello\"\ntt.redo(); // returns \"world\"\n```\n\n### With Arrays as State\n\n```typescript\nconst tt = timeTravel<number[]>([1, 2, 3]);\n\ntt.add([4, 5, 6]);\ntt.get(); // [4, 5, 6]\n\ntt.undo();\ntt.get(); // [1, 2, 3]\n```\n\n### With Objects\n\n```typescript\ntype User = { id: number; name: string };\n\nconst tt = timeTravel<User>({ id: 1, name: \"Alice\" });\n\ntt.add({ id: 2, name: \"Bob\" });\ntt.add({ id: 3, name: \"Charlie\" });\n\ntt.get(); // { id: 3, name: \"Charlie\" }\ntt.undo(); // returns { id: 2, name: \"Bob\" }\n```\n\n### Batch Add\n\n```typescript\nconst tt = timeTravel<number>(0);\n\ntt.addMany([1, 2, 3, 4, 5]);\ntt.get(); // 5\ntt.size;  // { past: 5, future: 0 }\n```\n\n### History Navigation\n\n```typescript\nconst tt = timeTravel<string>(\"a\");\ntt.add(\"b\");\ntt.add(\"c\");\ntt.add(\"d\");\n\ntt.go(-2); // returns \"b\" (jumped back 2 steps)\ntt.go(1);  // returns \"c\" (jumped forward 1 step)\ntt.go(-99); // returns undefined (out of bounds, state unchanged)\n```\n\n### Reset\n\n```typescript\nconst tt = timeTravel<number>(0);\ntt.add(1);\ntt.add(2);\n\ntt.reset();\ntt.get();    // 0\ntt.canUndo;  // false\ntt.canRedo;  // false\n```\n\n### Inspecting History\n\n```typescript\nconst tt = timeTravel<number>(0);\ntt.add(1);\ntt.add(2);\ntt.undo();\n\ntt.getHistory();\n// { past: [0], present: 1, future: [2] }\n```\n\n### Subscribe to Changes\n\n```typescript\nconst tt = timeTravel<number>(0);\n\nconst unsubscribe = tt.subscribe((state) => {\n  console.log(\"State changed:\", state);\n});\n\ntt.add(1);   // logs \"State changed: 1\"\ntt.undo();   // logs \"State changed: 0\"\n\nunsubscribe();\ntt.add(2);   // no log\n```\n\n### React Hook\n\n```typescript\nimport { useTimeTravel } from \"@biswaviraj/time-travel/react\"\n\nfunction Counter() {\n  const { state, add, undo, redo, canUndo, canRedo } = useTimeTravel(0)\n\n  return (\n    <div>\n      <p>Count: {state}</p>\n      <button onClick={() => add(state + 1)}>Increment</button>\n      <button onClick={() => undo()} disabled={!canUndo}>Undo</button>\n      <button onClick={() => redo()} disabled={!canRedo}>Redo</button>\n    </div>\n  )\n}\n```\n\nThe hook returns all core methods plus a reactive `state` property that triggers re-renders. Requires React 18+.\n\n## API\n\n### `timeTravel<T>(initialValue: T, options?: { limit?: number })`\n\nCreates a time travel instance.\n\n- `initialValue` — the initial state\n- `options.limit` — max number of past/future states to keep (default: `10`)\n\n### Methods\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `get()` | `T` | Get current value |\n| `add(value)` | `void` | Add a new state |\n| `addMany(values)` | `void` | Batch add states (last becomes current) |\n| `undo()` | `T \\| undefined` | Go back one step, returns new value |\n| `redo()` | `T \\| undefined` | Go forward one step, returns new value |\n| `go(n)` | `T \\| undefined` | Jump N steps (negative = back, positive = forward) |\n| `reset()` | `void` | Return to initial value, clear history |\n| `getHistory()` | `Readonly<History>` | Read-only snapshot of `{ past, present, future }` |\n| `subscribe(fn)` | `() => void` | Listen for changes, returns unsubscribe function |\n\n### Properties\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `canUndo` | `boolean` | Whether undo is available |\n| `canRedo` | `boolean` | Whether redo is available |\n| `size` | `{ past, future }` | Number of steps in each direction |\n\n### React\n\n```ts\nimport { useTimeTravel } from \"@biswaviraj/time-travel/react\"\n```\n\n`useTimeTravel<T>(initialValue: T, options?)` — returns all core methods and properties plus:\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `state` | `T` | Reactive current value (triggers re-render) |\n\n## TypeScript\n\nWritten in TypeScript with full type definitions. Generic `T` gives you type safety for any state shape.\n\n```typescript\n// Type is inferred\nconst tt = timeTravel(0);         // TimeTravel<number>\nconst tt = timeTravel(\"hello\");   // TimeTravel<string>\n\n// Or explicit\nconst tt = timeTravel<User>({ id: 1, name: \"Alice\" });\n```\n\n## Contributing\n\nContributions welcome! Please open an issue or submit a pull request.\n\nFor more information, visit the [GitHub repository](https://github.com/BiswaViraj/time-travel).\n\n## License\n\nISC\n","readmeFilename":"README.md"}