{"_id":"@belchior/time-traveler","_rev":"8-82f86f018dd1cb4d32a379ff994fac34","name":"@belchior/time-traveler","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"@belchior/time-traveler","version":"1.0.0","description":"[![Coverage Status](https://coveralls.io/repos/github/belchior/time-traveler/badge.svg)](https://coveralls.io/github/belchior/time-traveler) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)","main":"time-traveler.js","module":"time-traveler.js","author":{"name":"Belchior Oliveira","url":"https://github.com/belchior"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/belcihor/time-traveler.git"},"keywords":["state","state-management","time traveler","timeline"],"scripts":{"test":"npx jest","demo:build":"rm -rf dist; cp -rL ./example/src ./dist","demo:deploy":"npx gh-pages -d dist","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"},"dependencies":{},"devDependencies":{"babel-core":"^6.26.0","babel-jest":"^22.4.1","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.18.2","eslint-plugin-jest":"^21.13.0","gh-pages":"^1.1.0","jest":"^22.4.2","regenerator-runtime":"^0.11.1"},"gitHead":"9d64df60c327b032057741c600caea9674606d12","bugs":{"url":"https://github.com/belcihor/time-traveler/issues"},"homepage":"https://github.com/belcihor/time-traveler#readme","_id":"@belchior/time-traveler@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"belchior","email":"belchior@outlook.com"},"dist":{"integrity":"sha512-d9D5icjBgO7bdZnQpVZ7oT5XPqntvR/ipJNJ+iqwAyXojeG01mHS31fGmT5Rt5mWDUYXTPD6euyjiT5kb2rTQQ==","shasum":"82e033454c475a274d4b125f93a4a9ca01cff1aa","tarball":"https://registry.npmjs.org/@belchior/time-traveler/-/time-traveler-1.0.0.tgz","fileCount":19,"unpackedSize":80076,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPNhm1mMpAVOswRzmTH17wDGpXU22ZlRvc/tk/CG778AIhALE96cwQYNr12hIRV+XzYFLM6mILnr2UZIN+m2n+JqoT"}]},"maintainers":[{"name":"belchior","email":"belchior@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-traveler_1.0.0_1521425836661_0.05615881173142112"},"_hasShrinkwrap":false},"1.0.1":{"name":"@belchior/time-traveler","version":"1.0.1","description":"[![Coverage Status](https://coveralls.io/repos/github/belchior/time-traveler/badge.svg)](https://coveralls.io/github/belchior/time-traveler) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)","main":"time-traveler.js","module":"time-traveler.js","author":{"name":"Belchior Oliveira","url":"https://github.com/belchior"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/belcihor/time-traveler.git"},"keywords":["state","state-management","time traveler","timeline"],"scripts":{"test":"npx jest","demo:build":"rm -rf dist; cp -rL ./example/src ./dist","demo:deploy":"npx gh-pages -d dist","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"},"dependencies":{},"devDependencies":{"babel-core":"^6.26.0","babel-jest":"^22.4.1","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.18.2","eslint-plugin-jest":"^21.13.0","gh-pages":"^1.1.0","jest":"^22.4.2","regenerator-runtime":"^0.11.1"},"gitHead":"9d64df60c327b032057741c600caea9674606d12","bugs":{"url":"https://github.com/belcihor/time-traveler/issues"},"homepage":"https://github.com/belcihor/time-traveler#readme","_id":"@belchior/time-traveler@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"belchior","email":"belchior@outlook.com"},"dist":{"integrity":"sha512-2RH3ZwsXd9TBcvC9qCy1Q2uUw0lFgaGLPH1RPyI+UEs8BSh824uccQHsWJDQz3vWu0I36ISZUVZW5ZU/ubPiPA==","shasum":"565fc9b283368a212c8504e83d3afa2904e94de6","tarball":"https://registry.npmjs.org/@belchior/time-traveler/-/time-traveler-1.0.1.tgz","fileCount":5,"unpackedSize":12151,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDdKhpDOcwtcpNKESo0MoBx0rgypoEG5BVFaOujpi736AiAatD4mPKtEPxGVoLfH4O+ceNNOsByGJJxgTmj9/ZUljQ=="}]},"maintainers":[{"name":"belchior","email":"belchior@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-traveler_1.0.1_1521426240401_0.47390306711070385"},"_hasShrinkwrap":false},"1.0.2":{"name":"@belchior/time-traveler","version":"1.0.2","description":"[![Coverage Status](https://coveralls.io/repos/github/belchior/time-traveler/badge.svg)](https://coveralls.io/github/belchior/time-traveler) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)","main":"time-traveler.js","module":"time-traveler.js","types":"time-traveler.js","author":{"name":"Belchior Oliveira","url":"https://github.com/belchior"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/belcihor/time-traveler.git"},"keywords":["state","state-management","time traveler","timeline"],"scripts":{"test":"npx jest","demo:build":"rm -rf dist; cp -rL ./example/src ./dist","demo:deploy":"npx gh-pages -d dist","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"},"dependencies":{},"devDependencies":{"babel-core":"^6.26.0","babel-jest":"^22.4.1","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.18.2","eslint-plugin-jest":"^21.13.0","gh-pages":"^1.1.0","jest":"^22.4.2","regenerator-runtime":"^0.11.1"},"gitHead":"b0a9b151804cfe7cb3a255700b622989bded011e","bugs":{"url":"https://github.com/belcihor/time-traveler/issues"},"homepage":"https://github.com/belcihor/time-traveler#readme","_id":"@belchior/time-traveler@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"belchior","email":"belchior@outlook.com"},"dist":{"integrity":"sha512-9kMf4VeGIEgvrzyBr90kWMOi0vlfmNPb0ynCqV3szNW+li3I9uQDngHpylPRNaq2l90DmL2S3QVETKkxkzkzuQ==","shasum":"700b61c411b995a3186f0fb9e936d7ed029a8718","tarball":"https://registry.npmjs.org/@belchior/time-traveler/-/time-traveler-1.0.2.tgz","fileCount":5,"unpackedSize":12933,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFb8vCRoYXOPBTQMdbVVn2OFcTGYRasndWWR1GCcoZElAiA3ZrJYKqUjG6gu0kF3QGFYT6buD/6k5otk3Xgz0i7dyA=="}]},"maintainers":[{"name":"belchior","email":"belchior@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-traveler_1.0.2_1521510616494_0.4363455335452797"},"_hasShrinkwrap":false},"1.0.3":{"name":"@belchior/time-traveler","version":"1.0.3","description":"TimeTraveler é uma biblioteca para gerenciamento de estado. Ela torna-se útil em cenários onde é necessário compor um objeto (estado) baseado em uma sequência de passos (linha do tempo), ela permite alterarnar entre os estados produzidos usando uma alegor","main":"time-traveler.js","module":"time-traveler.js","types":"time-traveler.js","author":{"name":"Belchior Oliveira","url":"https://github.com/belchior"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/belcihor/time-traveler.git"},"keywords":["state","state-management","time traveler","timeline"],"scripts":{"test":"npx jest","demo:build":"rm -rf dist; cp -rL ./example/src ./dist","demo:deploy":"npx gh-pages -d dist","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"},"dependencies":{},"devDependencies":{"babel-core":"^6.26.0","babel-jest":"^22.4.1","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.18.2","eslint-plugin-jest":"^21.13.0","gh-pages":"^1.1.0","jest":"^22.4.2","regenerator-runtime":"^0.11.1"},"gitHead":"c50fa2761599efa389b174be2d73d197ec6638df","bugs":{"url":"https://github.com/belcihor/time-traveler/issues"},"homepage":"https://github.com/belcihor/time-traveler#readme","_id":"@belchior/time-traveler@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"belchior","email":"belchior@outlook.com"},"dist":{"integrity":"sha512-TwV3JfYY7uEr1hMvYsQGfC0tizX/5OwIgbZQWvQ1yeaY/s7qhoKdZMozIUFWbZzsJd6eU5xAajVRwSw+BtTcAw==","shasum":"fbf2cc70d160c5f5c7313e75381f6230bc0b9365","tarball":"https://registry.npmjs.org/@belchior/time-traveler/-/time-traveler-1.0.3.tgz","fileCount":5,"unpackedSize":14621,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDn3yQYK9JtCnto7TO0zRtA3wtZt0ya8HQNjygN6US5kAiEA6N1V8Uy2m8cGu0gMm1LYPOAuYgQJq7F7E/96e9dkMt0="}]},"maintainers":[{"name":"belchior","email":"belchior@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-traveler_1.0.3_1521638090016_0.05578914248231648"},"_hasShrinkwrap":false},"1.0.4":{"name":"@belchior/time-traveler","version":"1.0.4","description":"TimeTraveler é uma biblioteca para gerenciamento de estado. Ela torna-se útil em cenários onde é necessário compor um objeto (estado) baseado em uma sequência de passos (linha do tempo), ela permite alterarnar entre os estados produzidos usando uma alegor","main":"lib/time-traveler.js","module":"lib/time-traveler.js","types":"index.d.ts","author":{"name":"Belchior Oliveira","url":"https://github.com/belchior"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/belcihor/time-traveler.git"},"keywords":["state","state-management","time traveler","timeline"],"directories":{"lib":"lib"},"files":["index.d.ts","lib/time-traveler.js","lib/cjs/index.js","lib/mjs/index.mjs"],"scripts":{"test":"npx jest","mkdir":"mkdir -p lib/cjs lib/mjs","mjs":"cp lib/time-traveler.js lib/mjs/index.mjs","cjs":"npx babel lib/time-traveler.js -o lib/cjs/index.js","build":"npm run mkdir && npm run mjs && npm run cjs","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"},"engines":{"node":">=6.5"},"dependencies":{},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.1","babel-plugin-add-module-exports":"^0.2.1","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.18.2","eslint-plugin-jest":"^21.13.0","gh-pages":"^1.1.0","jest":"^22.4.2","regenerator-runtime":"^0.11.1","typescript":"^2.7.2"},"gitHead":"9a3fde3e151c5a70de04048937a899a3a278d8ee","bugs":{"url":"https://github.com/belcihor/time-traveler/issues"},"homepage":"https://github.com/belcihor/time-traveler#readme","_id":"@belchior/time-traveler@1.0.4","_npmVersion":"5.8.0","_nodeVersion":"9.6.1","_npmUser":{"name":"belchior","email":"belchior@outlook.com"},"dist":{"integrity":"sha512-W9XhHlT6O/0LrKn5vis/GsixE/DPVyZ/hwhUi5jnQ+7u0hbr8SgDDSY88BB6f/JO0HCfLnQDTvwDu6eyoS2Ytg==","shasum":"b2a389fe2d175a1f8c3fd62d5bf593b9b16efa9b","tarball":"https://registry.npmjs.org/@belchior/time-traveler/-/time-traveler-1.0.4.tgz","fileCount":7,"unpackedSize":12670,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFntcgVSdxH/sAnWXPCXzqJ9qs0GJFOyAmXVC2z/drl2AiBfsZHoMBnHMBV4t9wcMVk4fxfMplT/18saxzfj2FT9cA=="}]},"maintainers":[{"name":"belchior","email":"belchior@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-traveler_1.0.4_1523228159685_0.6359084641959569"},"_hasShrinkwrap":false},"1.2.0":{"name":"@belchior/time-traveler","version":"1.2.0","description":"TimeTraveler é uma biblioteca para gerenciamento de estado. Ela torna-se útil em cenários onde é necessário compor um objeto (estado) baseado em uma sequência de passos (linha do tempo), ela permite alterarnar entre os estados produzidos usando uma alegor","main":"lib/time-traveler.js","module":"lib/time-traveler.js","types":"index.d.ts","author":{"name":"Belchior Oliveira","url":"https://github.com/belchior"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/belchior/time-traveler.git"},"keywords":["state","state-management","time traveler","timeline"],"directories":{"lib":"lib"},"files":["index.d.ts","lib/time-traveler.js","lib/cjs/index.js","lib/mjs/index.mjs"],"scripts":{"test":"npx jest","mkdir":"mkdir -p lib/cjs lib/mjs","mjs":"cp lib/time-traveler.js lib/mjs/index.mjs","cjs":"npx babel lib/time-traveler.js -o lib/cjs/index.js","build":"npm run mkdir && npm run mjs && npm run cjs","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"},"engines":{"node":">=6.5"},"dependencies":{},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-jest":"^22.4.1","babel-plugin-add-module-exports":"^0.2.1","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.18.2","eslint-plugin-jest":"^21.13.0","jest":"^22.4.2","regenerator-runtime":"^0.11.1","typescript":"^2.7.2"},"gitHead":"4a49184109ed0e673e04ed9a76116cefa3ffc6e5","bugs":{"url":"https://github.com/belchior/time-traveler/issues"},"homepage":"https://github.com/belchior/time-traveler#readme","_id":"@belchior/time-traveler@1.2.0","_npmVersion":"5.8.0","_nodeVersion":"9.6.1","_npmUser":{"name":"belchior","email":"belchior@outlook.com"},"dist":{"integrity":"sha512-GO2HoNGRPlESUskHeaOhJrdpNGzzaZEN2yYjNHTGQqEM7WViD/oNAmpnLJSXVu/qOkiYtzQdpaHt0sd9R1/IGA==","shasum":"9d892e248f14a575064efae6797f85f089d88812","tarball":"https://registry.npmjs.org/@belchior/time-traveler/-/time-traveler-1.2.0.tgz","fileCount":7,"unpackedSize":13913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2UWZCRA9TVsSAnZWagAAGnsP/il34qqFOGhEDM90HHYJ\nAGZSD9czdvKib7bA95i78nDbRdYahep2LMt1wRGKjwqwxvsf7RuPzpJ9OBTS\nwgxsEARIurIQj8A7pHidM6ohQA3BRpUB6i+QuvNp/or9trv+XWUSu79C9q8o\nO72MCRM1BwAuLyIwUuDuLtBAzwIL+BloA7ajM1zX8rcsSARY+iK5lFpoNkgc\nKBDz4djLue8MyxGqDASHLZV9gglgUSH9j5ddyKokZl3hlE/8lLjprWzwaUTV\ne1EKjGgnrzUCzUfN/dquOL5mfFxKejt2Cy62GE+ACGQPE1Hbk0DtnVTUro5Y\n/xr53jM6yFE5/GiW+FnDhvR7Y9evWCeY0cjQZGoTVm/OgMKZDC2YxYpH11l5\n9tvlAehSI66F2Tg4EXUs9vxD1oFyb8Qo8YxTnIELwIZ/adhiAx9HizP3Y8Y3\n/teC7DJylX5jBWeXISvOabimQoP+w72AvMRvq2EnxZZ8ntt60KsRJVsb6Zfa\noIB7C4BBYLKPvmMDcr0oEGJUKoJjLDN6e9gJ4OI2eXHSniqYWJ1/S5qDVbJH\nOHMlSds0/bkYpMIQEDpxaSvadpq3lLfmX0Ahvjh2Zv33iKpeHjYcgxFO5eGs\nv7zZhp6yn5RFHDeA3a/OMTJHKuDPXR2KF0YOU8vP/JCP69OvIDMh2lO5xTDj\n14nH\r\n=QOQD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOSX1o6JfsAmmGvQGE9y9fFsbA7kAyFF3i+dsHf+sDfgIgDYQ4HvSFxl6PSNBf8IvyvmfLy2wGvq3bm0CsCWVQZcQ="}]},"maintainers":[{"name":"belchior","email":"belchior@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-traveler_1.2.0_1524188568168_0.7931341354385701"},"_hasShrinkwrap":false},"1.4.0":{"name":"@belchior/time-traveler","version":"1.4.0","description":"TimeTraveler is a library to management of state. It becomes useful in scenarios that is necessary compose object (state) based on a sequence of steps (timeline).","main":"lib/time-traveler.js","module":"lib/time-traveler.js","types":"index.d.ts","author":{"name":"Belchior Oliveira","url":"https://github.com/belchior"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/belchior/time-traveler.git"},"keywords":["time travel","timeline","state","state-management"],"directories":{"lib":"lib"},"files":["index.d.ts","lib/time-traveler.js","lib/cjs/index.js","lib/mjs/index.mjs"],"scripts":{"test":"npx jest","mkdir":"mkdir -p lib/cjs lib/mjs","mjs":"cp lib/time-traveler.js lib/mjs/index.mjs","cjs":"npx babel lib/time-traveler.js -o lib/cjs/index.js","build":"npm run mkdir && npm run mjs && npm run cjs","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"},"engines":{"node":">=6.5"},"dependencies":{},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.3","babel-jest":"^22.4.3","babel-plugin-add-module-exports":"^0.2.1","babel-preset-env":"^1.6.1","coveralls":"^3.0.1","eslint":"^4.19.1","eslint-plugin-jest":"^21.15.1","jest":"^22.4.3","regenerator-runtime":"^0.11.1","typescript":"^2.8.3"},"gitHead":"559b46776ced535ee3633d86b8b5802ceaa68310","bugs":{"url":"https://github.com/belchior/time-traveler/issues"},"homepage":"https://github.com/belchior/time-traveler#readme","_id":"@belchior/time-traveler@1.4.0","_npmVersion":"6.0.0","_nodeVersion":"8.10.0","_npmUser":{"name":"belchior","email":"belchior@outlook.com"},"dist":{"integrity":"sha512-cnVlI+sj5dzsfiRdqxWYW5bYzRm9VsbBWM4RQck8MFGZiAVwEqfehnpJ2Z2izrZUdV08pwWp74s96ZsCiVcO6A==","shasum":"cfc98d83e925ba62fefdbdd9c9862b26b4e28624","tarball":"https://registry.npmjs.org/@belchior/time-traveler/-/time-traveler-1.4.0.tgz","fileCount":7,"unpackedSize":16685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8l/WCRA9TVsSAnZWagAAXpcP/3Ku3ablrQRBfFPhsZpE\nJ/JtnGuQTzqQ8FsUT+MfLZ9VzpCJsCceEecM9AYsZ+ylr9fy/f/xNyFksOOL\nU5ZtynShtBC+aXeP2XtWAjNe77J7ki/h8oTKi4cKEA3ymV1QkL8Ni8QfuCoP\nFzoxt88qAoIYfDIVb/KJoQRlT8gPsdJCt/I1R1FG1FYnqqpJ+y9MZuRWhlk1\n64oYtKvhxJ0Ewosr0XiZgOA91GrTAQ26CX3UFRPLComCTGPTJfArMkSNaDpq\n23P+eoTAEUW7ThqpNoQPDnCC0O9nZZkTZBq8xevYLSRSG9kh+N7ZIoderUNW\nfUBwFc9yunD3ojNKgbSFsfRtSefKeP9USROGxIdH5YRt9Wn4PB8PgxgkMBqE\ny2ZWXLdJ66KfB39t6RU98Sa/aFwriDYMLPILl2YFy+7IXHee6QOkhQ5VXNMx\n+VjIUP+VMK+kSNDpUzJQpkqVwcnIDOflTGRFvdXHmXtoTkrfwxsJnBw/n0Mr\noBwV7r0tWXkV3gwI3J2SlRL6pQM/XPkzwOUd0iC57l0M+lOn9siDU9FiN4XG\neMWmuyQWZWHeBQ4XcWN9radVPT3mxSikr4Gu5YnyOruKZKxRcMb5pRXRhkgg\nJ2YcSMT9n5Y/i60rOhafp722hvDEo+SwaCBJjC71X0+Av23okFo2C+tLhR20\nhMrG\r\n=1IS0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVjVDx88N8KrQGSJUe0A/pC0cp0HddR4H/FUq+aIfwcwIhAOtTrNWkOZx3n3lK0rrGPrpuqCeR+hluCMdUTPyavVHv"}]},"maintainers":[{"name":"belchior","email":"belchior@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-traveler_1.4.0_1525833686374_0.1774117813537366"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-19T02:17:16.610Z","1.0.0":"2018-03-19T02:17:16.983Z","modified":"2022-04-04T18:19:46.195Z","1.0.1":"2018-03-19T02:24:00.457Z","1.0.2":"2018-03-20T01:50:16.545Z","1.0.3":"2018-03-21T13:14:50.067Z","1.0.4":"2018-04-08T22:55:59.814Z","1.2.0":"2018-04-20T01:42:48.276Z","1.4.0":"2018-05-09T02:41:26.464Z"},"maintainers":[{"name":"belchior","email":"belchior@outlook.com"}],"description":"TimeTraveler is a library to management of state. It becomes useful in scenarios that is necessary compose object (state) based on a sequence of steps (timeline).","homepage":"https://github.com/belchior/time-traveler#readme","keywords":["time travel","timeline","state","state-management"],"repository":{"type":"git","url":"git+https://github.com/belchior/time-traveler.git"},"author":{"name":"Belchior Oliveira","url":"https://github.com/belchior"},"bugs":{"url":"https://github.com/belchior/time-traveler/issues"},"license":"MIT","readme":"[![Coverage Status](https://coveralls.io/repos/github/belchior/time-traveler/badge.svg)](https://coveralls.io/github/belchior/time-traveler)\n[![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n# TimeTraveler\nTimeTraveler is a library to management of state. It becomes useful in scenarios that is necessary compose object (_state_) based on a sequence of steps (_timeline_).\n\nThink in on behavior of your browser when you navigate between pages, it makes available to you go back and forward or jump to an specific page if you press and hold the button of Prev or Next. This concept of time traveling is the major feature of TimeTraveler but you can do more.\n\n**Demo:** [https://belchior.github.io/time-traveler/](https://belchior.github.io/time-traveler/)\n\n\n## Installation\nRun the command to install\n```shell\nnpm i @belchior/time-traveler\n```\n\n## Import\n```js\n// Default / TypeScript\nimport TimeTraveler from '@belchior/time-traveler';\n\n// Node ECMAScript module\nimport TimeTraveler from '@belchior/time-traveler/lib/mjs';\n\n// Node CommonJS\nconst TimeTraveler = require('@belchior/time-traveler/lib/cjs');\n```\n\n## API\n\n### Class methods\n\n#### constructor(_timeline_, _initialState_)\n_**timeline**_ `required` - A list of functions that will be used to produce new states\n\n_**initialState**_ `optional` - If passed will be the first state produced by TimeTraveler, otherwise the _**initialState**_ will be produced by the execution of the first function into _**timeline**_\n\nReturns a new instance of TimeTraveler\n\n**Usage**\n```js\nconst timeline = [/* ... */];\nconst tt = new TimeTraveler(timeline);\n```\n\n#### create(_timeline_, _initialState_)\n`recommended` Alias to constructor method. The lines above are equivalents\n\n```js\nconst tt = TimeTraveler.create(timeline);\n```\n```js\nconst tt = new TimeTraveler(timeline);\n```\n\n### Instance methods\n\n#### add(_fn_) - return _this_\n_**fn**_ `required` - Function that will produce state\n\nAdds _**fn**_ at the end of the _**timeline**_\n\n**Usage**\n```js\nconst timeline = [/* ... */];\nconst finalStep = state => {/* ... */};\nconst tt = TimeTraveler.create(timeline);\nconst tt.add(finalStep);\n```\n\n#### getState() - return _current state_\nReturn the current state produced by _**timeline**_\n\n**Usage**\n```js\nconst timeline = [/* ... */];\nconst tt = TimeTraveler.create(timeline);\nconst currentState = tt.getState(); // the initial state\n```\n\n#### goTo(_fn_) - return _this_\n_**fn**_ `required` - Function belonging to _**timeline**_\n\nSet the current state traveling the _**timeline**_ in both direction or jumping to some point in \"time\". In case the received function have already been called the state will be taken from the cache, otherwise will be produced calling the received _**fn**_.\n\nNote that the sequence matters, if _**goTo**_ is used in a way that don't follow the _**timeline**_ the methods _**next()**_ and _**prev()**_ will try to follow the _timeline_ created by _**goTo**_ and then get possibles states from the _**timeline**_. Try the [demo](https://belchior.github.io/time-traveler/) to get more insides.\n\n**Usage**\n```js\nconst initialState = () => {/* ... */}\nconst stepA = () => {/* ... */}\nconst timeline = [initialState, stepA];\nconst tt = TimeTraveler.create(timeline);\n\ntt.goTo(stepA); // the current state is stepA\ntt.goTo(initialState); // the current state is initialState\n```\n\n#### next() - return _this_\nSet the current state traveling the _**timeline**_ to the future.\n\n**Usage**\n```js\nconst initialState = () => {/* ... */}\nconst stepA = () => {/* ... */}\nconst timeline = [initialState, stepA];\nconst tt = TimeTraveler.create(timeline);\n\ntt.next(); // the current state is stepA\n```\n\n#### prev() - return _this_\nSet the current state traveling the _**timeline**_ to the past.\n\n**Usage**\n```js\nconst initialState = () => {/* ... */}\nconst stepA = () => {/* ... */}\nconst timeline = [initialState, stepA];\nconst tt = TimeTraveler.create(timeline);\n\ntt.next(); // the current state is stepA\ntt.prev(); // the current state is initialState\n```\n\n#### reset() - return _this_\nClear the states produced by _**goTo(fn)**_ and _**next()**_. Define the current state as the same produced by _**initialState**_\n\n**Usage**\n```js\nconst initialState = () => {/* ... */}\nconst stepA = () => {/* ... */}\nconst stepB = () => {/* ... */}\nconst timeline = [initialState, stepA, stepB];\nconst tt = TimeTraveler.create(timeline);\n\ntt.next().next(); // the current state is stepB\ntt.reset(); // the stepA and stepB was removed and the current state is initialState\n```\n\n\n## How to use\n```js\nimport TimeTraveler from '@belchior/time-traveler';\n\nconst initialState = () => ({ stepA: '', stepB: '', });\nconst stepA = state => ({ ...state, stepA: 'done', });\nconst stepB = state => ({ ...state, stepB: 'done', });\nconst timeline = [ initialState, stepA, stepB, ];\n\nconst tt = TimeTraveler.create(timeline);\n\nconsole.log('initialState:', tt.getState());\ntt.next();             console.log('next (stepA)', tt.getState());\ntt.next();             console.log('next (stepB)', tt.getState());\ntt.prev();             console.log('prev (stepA)', tt.getState());\ntt.goTo(initialState); console.log('goTo (initialState):', tt.getState());\ntt.goTo(stepB);        console.log('goTo (stepB):', tt.getState());\n```\n","readmeFilename":"README.md"}