{"_id":"@agoyu/procaser","_rev":"4-c5a1444ffffce8f72676a56ec659e844","name":"@agoyu/procaser","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@agoyu/procaser","version":"0.1.0","description":"To combine processing into a single callback function which can be handled by a switch-case statement.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","test":"jest --config jestconfig.json"},"keywords":["process","state pattern"],"author":{"name":"Yuichi Ago"},"license":"MIT","devDependencies":{"@types/jest":"^29.2.5","@typescript-eslint/eslint-plugin":"^5.48.0","@typescript-eslint/parser":"^5.48.0","eslint":"^8.31.0","eslint-config-prettier":"^8.6.0","eslint-config-standard-with-typescript":"^26.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-n":"^15.6.0","eslint-plugin-promise":"^6.1.1","jest":"^29.3.1","prettier":"^2.8.2","ts-jest":"^29.0.3","typescript":"^4.9.4"},"gitHead":"bf14a5436067f74efae184ac000745cbcaa68e21","_id":"@agoyu/procaser@0.1.0","_nodeVersion":"18.12.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-BiqWrhcsn2+F2zrqFV8LmwKfHQXoXLArjGZheLRdUnkBPT6Yua+8d46D9ThhdJEhqyViUE6EgK/l3DdGTZgzeQ==","shasum":"21f71d4afbe4bd6ab7b219b4c322afde92c84467","tarball":"https://registry.npmjs.org/@agoyu/procaser/-/procaser-0.1.0.tgz","fileCount":13,"unpackedSize":16724,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGzceSe8wTQOL1YY0DIAdlbnDsPr9qc4QM6NC5mGs2lEAiEAxvORzBix+2AWv8N5zByX6e902zvb2zNuqe7pRypBuac="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJju8uyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvBhAAjNE8GQp/r3kj3wfCvnL+bNwnIPvIfsW6u/rmE4E7Iv4KEVNL\r\nT1zHTKI2lNhCdvGqhemq7Xq9+et4whKTqPjMPplacLmhWU1M6HiHhVKW/d9i\r\nS1oT2u7iCMuHbZ06r4YL2dWkpTTPV2CRDvrJIajv2nSBRfW3PgAGb7zWULsw\r\nSnHCq6ad/u6rsJUAc9plMhsUwgu6MXdUIMPZmQAgXfTpXqVdT7I/7Gaz2iGn\r\nTPNDJaR/kdg2P1aerZHw5/js6d3cB/+b7391EYKZWwA4JHDgxeIIJXet9od1\r\nzKWYCKGOTGDp9o5R86HqZBdAGxs+rDVkXLg1GM8QBSIWhFoTDlgem67HXgRt\r\nr/3ogQpsgsFzIOixPOl6mTtrC5dgsdt/7gYqOPxx0ev5JKxJ+tGEsH+qC8du\r\nMKnWBwGvjdwK+jUa5s+7Wyi8IJevkZDgWFFgoBSQ9rniL0f5cXHGrR3Xz0Uk\r\nC32spL2+fiYAj0AC1WKe3GbEThFztb/1xRs+BNkz6+WabH5Wh3yjN1SLiZgc\r\n7uR/EdOBZTVjw5yykVj2O6q8DUSk4R9PtRphHMZBq2gEKoUNyn3FKzqCawcu\r\n6dAd2Pvihk/+sEYFxtOEftY9OHpyl9sMnvNjfONEexn7Sn+F2dFMIZxnWiRZ\r\nABBIJ1EMh6bwLYqdhmPBvN+IER+RUuNbnac=\r\n=JWn4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"agoyu","email":"agoyu@responken.com"},"directories":{},"maintainers":[{"name":"agoyu","email":"agoyu@responken.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/procaser_0.1.0_1673251762306_0.0650391231418268"},"_hasShrinkwrap":false},"0.1.1":{"name":"@agoyu/procaser","version":"0.1.1","description":"To combine processing into a single callback function which can be handled by a switch-case statement.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","test":"jest --config jestconfig.json"},"keywords":["process","state pattern"],"author":{"name":"Yuichi Ago"},"repository":{"type":"git","url":"git+https://github.com/YuichiAgo/procaser.git"},"license":"MIT","devDependencies":{"@types/jest":"^29.2.5","@typescript-eslint/eslint-plugin":"^5.48.0","@typescript-eslint/parser":"^5.48.0","eslint":"^8.31.0","eslint-config-prettier":"^8.6.0","eslint-config-standard-with-typescript":"^26.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-n":"^15.6.0","eslint-plugin-promise":"^6.1.1","jest":"^29.3.1","prettier":"^2.8.2","ts-jest":"^29.0.3","typescript":"^4.9.4"},"gitHead":"e1101471cd3b3342992281524a9fdba908478b71","bugs":{"url":"https://github.com/YuichiAgo/procaser/issues"},"homepage":"https://github.com/YuichiAgo/procaser#readme","_id":"@agoyu/procaser@0.1.1","_nodeVersion":"18.12.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-LA2qOtPvlOOdCkIECWDKZXrce1n/LA4X+9Wcvdsqy9Lx1Y6+98fW1MMQvhUc6/Cb++sn8ua/azTjK9Hho79mEA==","shasum":"676236d23eb9ae7a0203371ee763b83469c05b66","tarball":"https://registry.npmjs.org/@agoyu/procaser/-/procaser-0.1.1.tgz","fileCount":9,"unpackedSize":18004,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwBhsGazaDtb5k58PWU5EFidRGaL9OPLi/yP/+3yAcoQIhAJ3ZNCnK9OxfbXB+15XktsHe5HAq9bzcf+YcgygzdPwz"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvEeuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZSg//VYAnFmxWKI12l+o8p54H8C8mZpyRPWALn/A4f/x7n3Kq6xyK\r\ng1rbsPJSMXxV0q4yVA9QwTSZlyVLnHARSfIbDfu8dTHuIM3pwsHSh5GbWcZE\r\nMPyXj0OMMBfzc4vTk/8CveJ8UEf7eSUFqBgrsJuFL0L5G3ZkJ3NHfOgD1lbQ\r\nemEdJPGEEI6CV3NgPIMZ7qf2n5w7MbNAlPQcpKHVdkJua7SDv9kWRtZnqfxE\r\nSZShk2rHpq7C/plsVwC5s8JoRlbo2FqyTrJEDuDeQzpOgbEfsFg5pDr4WMG5\r\nDxD511l5ydzPletj56b9zDUi1Bw2mfg19HgQlnd/MWAgN/PEcrddj5g+5oSL\r\nTAaC00qNlJ50orAmfmKQX7KOQT74DIw5krzr6aHpk8V+nEXQ3YvmirC+cZdQ\r\nKAcH9AYlvkUAxTLIfE6Yw1dwTQFtq+I0sXJu3Ba2oQpoU5B0AU14h9oyDh40\r\n7a86Fj7noUXsJZsATKpkNZeR/fZcAF44lR32LOi/XdP48Mm/6gHzFEQ9lsbm\r\nHnUgReHIcjW6qSkJq76LyklL/eAQcqW/8ymoNWRElNWoHrs8wK6RtRDN+z7q\r\nVwJ5m0SV6FSHekHEGCt27XZPAgRC9cdM0iwvuXEP6lDxTrqKTQ3yTiXpD6PQ\r\na8xbOXLpblAfajenTceBo3hMxeKTxT48yko=\r\n=wlsv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"agoyu","email":"agoyu@responken.com"},"directories":{},"maintainers":[{"name":"agoyu","email":"agoyu@responken.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/procaser_0.1.1_1673283502088_0.05582299801301338"},"_hasShrinkwrap":false},"0.1.2":{"name":"@agoyu/procaser","version":"0.1.2","description":"To combine processing into a single callback function which can be handled by a switch-case statement.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","test":"jest --config jestconfig.json"},"keywords":["process","state pattern"],"author":{"name":"Yuichi Ago"},"repository":{"type":"git","url":"git+https://github.com/YuichiAgo/procaser.git"},"license":"MIT","devDependencies":{"@types/jest":"^29.2.5","@typescript-eslint/eslint-plugin":"^5.48.0","@typescript-eslint/parser":"^5.48.0","eslint":"^8.31.0","eslint-config-prettier":"^8.6.0","eslint-config-standard-with-typescript":"^26.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-n":"^15.6.0","eslint-plugin-promise":"^6.1.1","jest":"^29.3.1","prettier":"^2.8.2","ts-jest":"^29.0.3","typescript":"^4.9.4"},"gitHead":"325896c6d59d22c16ec24495ed86e696cbdf1db0","bugs":{"url":"https://github.com/YuichiAgo/procaser/issues"},"homepage":"https://github.com/YuichiAgo/procaser#readme","_id":"@agoyu/procaser@0.1.2","_nodeVersion":"18.12.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-2dF0buai979JoJo/QvWQ/lp8zUF06xYqJ+bDRfaXdsJKyevO+QFuvbTp85ADLFbiohX3mq+1JwPSom0tQPWXPw==","shasum":"9fff016067224aac506c32085d2540566a98e97d","tarball":"https://registry.npmjs.org/@agoyu/procaser/-/procaser-0.1.2.tgz","fileCount":9,"unpackedSize":17734,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCijZtsxE+DsSCKplHX5UZ6Zi6LoH/HX62/vFn6vF6nGAIgAcfq06uJ1aQBeGznEUj+OW1jIMxBJ58KTo9UhF+rN38="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxE3jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJvg//VjL7O226I/7ueavcsEBRpO5mXnWW8kzdGB2HbSXNHYoJ6vcq\r\nWuCjnBj5VODFVldQj0sWuguUE24SDSt96v+qRuqpibCN6eNB9yAWy5hDjkFG\r\niVifrh98xBqqs+vrJuXYGFQK84gQkbYhr6KjS5T7FHBueAa0ipwWIbA+j/uC\r\npFWM3AlDVOHur/gCLS5GdTwrAXYXn8jHSS8QLR3j+lu5F1QZYGrevhJcq4UW\r\nMtrnMCr9+dgAUX46yjBB32/hV+OZLZC0yPoSCowY45NkGrRkQC7+I75oofhO\r\nPVsMBO2hbF9U6SoUOZsF/SDv7xmxmu2EPen3i8G1hPfTXIMl6xylnQG/CHsc\r\n2kP1wxXJ3Xv1Xh/xvAz8Siow+XgJU30KDWgmVOWn5Fa/MfD4rC2y+ohO59T6\r\nQ2weAS7sy8sYlDug74Xca0G7UKIwwr1TWBevY75yvyDYABb0WuxM5YPQEC2B\r\nWX02z3HjcEcqJDfqkLNr87U1FOLEedJ9u7MWjbeGit5p4JwSuaSKYp5GiBqB\r\ndwtS3kilVmsO+Y9IE9RbGct0Fnl8SFrLT74AptrEOo9Tq2XiV3tuxB5U9PZY\r\nSmsM9hpR2/rFy+dCamx337B+SZlCH75lSalUmqZjh2usNwHD4iC93kgFd6c9\r\nzz7aTMn+6T1S51U928EtvRp+fgoyHSuYx6c=\r\n=Limv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"agoyu","email":"agoyu@responken.com"},"directories":{},"maintainers":[{"name":"agoyu","email":"agoyu@responken.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/procaser_0.1.2_1673809379609_0.7342657101495862"},"_hasShrinkwrap":false},"0.2.0":{"name":"@agoyu/procaser","version":"0.2.0","description":"To combine processing into a single callback function which can be handled by a switch-case statement.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","test":"jest --config jestconfig.json","prepare":"husky install"},"keywords":["process","state pattern"],"author":{"name":"Yuichi Ago"},"repository":{"type":"git","url":"git+https://github.com/YuichiAgo/procaser.git"},"license":"MIT","devDependencies":{"@types/jest":"^29.2.5","@typescript-eslint/eslint-plugin":"^5.48.0","@typescript-eslint/parser":"^5.48.0","eslint":"^8.31.0","eslint-config-prettier":"^8.6.0","eslint-config-standard-with-typescript":"^26.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-n":"^15.6.0","eslint-plugin-promise":"^6.1.1","husky":"^8.0.3","jest":"^29.3.1","prettier":"^2.8.2","ts-jest":"^29.0.3","typescript":"^4.9.4"},"gitHead":"42b32db457306b658cf7090a19b98029d0666b54","bugs":{"url":"https://github.com/YuichiAgo/procaser/issues"},"homepage":"https://github.com/YuichiAgo/procaser#readme","_id":"@agoyu/procaser@0.2.0","_nodeVersion":"18.12.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-7NrTxqsLHmr/HMc8Yqh03jYvJ1d0fGCjDAG2HsN3P3uwgTUSc8beRBz4e2wFwvDgy5kZWdfUgX+GUyJj0JzPJg==","shasum":"0f817919d9da835eeef701b9743bcc1e7f514125","tarball":"https://registry.npmjs.org/@agoyu/procaser/-/procaser-0.2.0.tgz","fileCount":9,"unpackedSize":21921,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6ecsMzqdjVrHImDrCgk8cZrKs2BCxvQM9+wGtBQzCCAiEA2QIhCdE8t84VoNH3rCLKFVWHZMJ/EerpwtUx+I22CKA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjy1s9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqoIg//ZtH2QDNzhucvjX7pimVeddaeO0zMQbFiK0zZnwfy0L9xDeYS\r\ntTZZo320IurQlX9Mk5WkpnQilbGLbOFq66sW+dPsuA72q29dIw5ZmAUgfBMQ\r\nKcFBjlbkUQBrzueK+FNmE1Q8ADkVPH+csKFOMGFzgZ2Z9brpZP7ta71fzJZr\r\nEP0pcn1BcVdNfy8OQufModMmsR6A3VY9pg2zfkc6G1iIOVCrkdtp8f+oUUuq\r\n8ojjQwkU+ldws3zAsFmfi2wwxb7OtNlzYBcZO9aTkRS5DE8vR3YONoogdw0h\r\ntILkEMcu0yMxZulh5si3fN5b/M4SgtK2Y1o6LUK46gMSqVOJPkjRUGBAqvRN\r\nIARBek8bRM7GDvsMdcPrhXabi9IPsx1n6P4l6H1DD3gj9pf3qOX6ystbHqM6\r\nZnrbewl1utB8C71120/1jp+voc4RIVmFVku6Qa3mPPPJ47ijVHRRzyWR6H7O\r\nZys3lApHPbNBgoK+6v82p6CnFj788JGTPX3ZTFdbezG2HCUaLwcVLehBnJCF\r\nTQRKuioMQ0emdR9h+/YZoH94oksvTz23CrFvm9RGlKWtOMcK0b9FvDjgevub\r\n2US7AA91v9+eZ2lOYjXhMcOJ4tqSZqUCapzn2ciS26Ia3NvMrK+K0FvmwgJd\r\nrEH167Nl3sFafCu9dXHdzLvgc+Z9a86U/k8=\r\n=XsIy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"agoyu","email":"agoyu@responken.com"},"directories":{},"maintainers":[{"name":"agoyu","email":"agoyu@responken.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/procaser_0.2.0_1674271549347_0.01927293289898735"},"_hasShrinkwrap":false},"0.2.1":{"name":"@agoyu/procaser","version":"0.2.1","description":"To combine processing into a single callback function which can be handled by a switch-case statement.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","test":"jest --config jestconfig.json","prepare":"husky install"},"keywords":["process","state pattern"],"author":{"name":"Yuichi Ago"},"repository":{"type":"git","url":"git+https://github.com/YuichiAgo/procaser.git"},"license":"MIT","devDependencies":{"@types/jest":"^29.2.5","@typescript-eslint/eslint-plugin":"^5.48.0","@typescript-eslint/parser":"^5.48.0","eslint":"^8.31.0","eslint-config-prettier":"^8.6.0","eslint-config-standard-with-typescript":"^26.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-n":"^15.6.0","eslint-plugin-promise":"^6.1.1","husky":"^8.0.3","jest":"^29.3.1","prettier":"^2.8.2","ts-jest":"^29.0.3","typescript":"^4.9.4"},"gitHead":"e022f923334a9b1c8fa42e54a1c84cdb1f3e8831","bugs":{"url":"https://github.com/YuichiAgo/procaser/issues"},"homepage":"https://github.com/YuichiAgo/procaser#readme","_id":"@agoyu/procaser@0.2.1","_nodeVersion":"18.12.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-HOaEEUgIyVBVumrzKXCcAxJ83YXPT+YQV3AFKBXQEuuJQ9JmJrpGfZNeJNDK/ohvPdWR38rIfhbbCFF+VwP9Gw==","shasum":"80f0ac3fbcf028ca7c75ae53d072c2aaa8d393d3","tarball":"https://registry.npmjs.org/@agoyu/procaser/-/procaser-0.2.1.tgz","fileCount":9,"unpackedSize":25746,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCA3ZC+6C0qim4F32H1y10m3alzrZ9Lxl0VAEhoO3vB+wIhAOOMJkKRmy6x6zEzHt1+BBx7Vjv2vruDmqtrUdR1VSi7"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjy2+7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmow9Q/9HooKbNIZnWEaAywXQxDcgrVAo+lFvHpxNrkv9BsSMzmSYhRf\r\nF1+1H6x2Wq5cr+eH+piCuSv6TvW7SS0Pb6RBCZW//KJZgc1/IeK2RfKDdkEr\r\nsKx51cSQ2Hhz2mfn2/OkSTJhoCb9T8PkV9gxcifsH/57nvyM1E1UBRexF7/k\r\ncqAV9nRT3RGf0L2vV+T4sedph8+GBbtvmuKDUGdB0NdAvvXpuoouP7NAt3bI\r\nQChhQ0bgtrJw4gKRclM1xl4vO5UzDgLGmJEIhyRCVi2BrUePwMthMBJsahyy\r\nTwq3RDPXIfLzgL0Fm5/mhdGmQSe7c4XMu0LP9juiG4cikx4q3d+mDIDcjBSc\r\nmToaq7Yiwk4wN8cPQ2fhlj/4upMfsxdz6+KTuovRMmdmHgmT0QEdLkjGJyWF\r\nwaz14b/twx2KkD0ec1wLy7nnobFJGgipVoPkcsthEso1JmuXzQZaKKWsCYlc\r\nsBfg1ZS69YxAXxk8JdRamLf6VMUCkOGYcGyd2HmhBpagtXUFU5H8dwzKD/Bx\r\ne26WpAt5Ms4cKdgZswbHIgi5MzRulEGsaywTnZFx0oZKA856t4Ci6OrnZJSv\r\n1//zcfL0Yt3UDRNi64fSs1aoa72r0wLPfmi7Cv/vFKi1p0ZjSf3acyUQjvFh\r\nggSWxf0+Iq7CpBhyvNnQWnuRKVqvRn+mA9Y=\r\n=MMPl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"agoyu","email":"agoyu@responken.com"},"directories":{},"maintainers":[{"name":"agoyu","email":"agoyu@responken.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/procaser_0.2.1_1674276795208_0.37136048840900315"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-09T08:09:22.237Z","0.1.0":"2023-01-09T08:09:22.491Z","modified":"2023-01-21T04:53:15.493Z","0.1.1":"2023-01-09T16:58:22.233Z","0.1.2":"2023-01-15T19:02:59.799Z","0.2.0":"2023-01-21T03:25:49.497Z","0.2.1":"2023-01-21T04:53:15.385Z"},"maintainers":[{"name":"agoyu","email":"agoyu@responken.com"}],"description":"To combine processing into a single callback function which can be handled by a switch-case statement.","keywords":["process","state pattern"],"author":{"name":"Yuichi Ago"},"license":"MIT","readme":"\n# Procaser\n\nTo combine processing into a single callback function which can be handled by a switch-case statement.\n\n# Installation\n\n```\n\nnpm i @agoyu/procaser\n\n```\n\n# Usage\n\n```javascript\n\nimport {Procaser} from '@agoyu/procaser';\n\n  new Procaser(null, (proc, step, props) => {\n    switch (step) {\n      case proc.BOOT:\n        proc.next('MyStep');\n        break;\n      case 'start@MyStep':\n        // write your process management\n        // ...\n      case proc.EXIT:\n        break;\n    }\n  });\n\n```\n\n# Example\n\n```javascript\n\nprocessJob(willSuccess) {\n  const myProps = {\n    name: 'Potesuke',\n    email: 'pote@example.com'\n  };\n  \n  const caser = new Procaser(\n    myProps,\n    (proc, step, props) => {\n      console.log('step:' + step);\n      switch (step) {\n        case proc.BOOT:\n          proc.next('Process');\n          break;\n\n        case 'start@Process':\n          this.showProgressPopup({\n            title: 'Processing',\n            caption: 'Please Wait',\n          });\n          this.requestProcess(proc, willSuccess);\n          break;\n        case 'end@Process':\n          this.showProgressPopup(false);\n          break;\n        case 'success@Process':\n          proc.next('Complete');\n          break;\n        case 'failed@Process':\n          proc.next('Failed');\n          break;\n\n        case 'start@Complete':\n          this.showConfirmPopup(\n            {\n              title: 'Process succeeded',\n              caption: 'You made it!',\n              yes: 'OK',\n              no: false,\n            },\n            proc);\n          break;\n        case 'end@Complete':\n          this.showConfirmPopup(false);\n          break;\n        case 'confirm@Complete':\n          proc.exit();\n          break;\n\n        case 'start@Failed':\n          this.showConfirmPopup(\n            {\n              title: 'Process failed',\n              caption: 'Try again!',\n              yes: 'OK',\n              no: false,\n            },\n            proc);\n          break;\n        case 'end@Failed':\n          this.showConfirmPopup(false);\n          break;\n        case 'confirm@Failed':\n          proc.exit();\n          break;\n        \n        case proc.EXIT:\n          break;\n      }\n    }\n  );\n}\n\n/**\n * Send the signal to the Procaser after 2 seconds\n * @param {Procaser} proc \n * @param {boolean} willSuccess \n */\n requestProcess(proc, willSuccess) {\n  setTimeout(() => {\n    if (willSuccess) {\n      proc.signal('success');\n    } else {\n      proc.signal('error');\n    }\n  }, 2 * 1000);\n}\n\n```\n\n# Methods\n\n## constructor\n\nconstructor\n\n### Parameters\n\n*   `props` **([object][20] | null)** The object you can deal with in the Procaser instance. (optional, default `{}`)\n*   `callback` **[Function][21]** Function to be called back when the step or state is changed (optional, default `(step:string,proc:Procaser,props:object)=>{}`)\n\n## next\n\nMoving on to the next step, the callback passes through \"end@currentStep\" and \"start@nextStep\" case statements\n\n### Parameters\n\n*   `stepName` **([string][19] | [undefined][22])** Next step name\n*   `props` **[object][20]** Values to be assigned to the properties (optional, default `{}`)\n*   `wait` **[number][23]** Millisecond time before the callback on the next step starting. If negative, immediately. (optional, default `-1`)\n\nReturns **this**&#x20;\n\n## exit\n\nTerminates the process, the callback passes through \"end@currentStep\" and proc.EXIT case statements\n\nReturns **this**&#x20;\n\n## signal\n\nApply state to the current step, the callback passes through \"yourState@currentStep\" case statement\n\n### Parameters\n\n*   `state` **[string][19]** Any state name\n*   `props` **[object][20]** Values to be assigned to the properties (optional, default `{}`)\n*   `wait` **[number][23]** Millisecond time before the callback passes through the \"yourState@currentStep\" case statement. If negative, immediately. (optional, default `-1`)\n\nReturns **this**&#x20;\n\n## confirm\n\nApply the 'confirm' state to the current step, the callback passes through \"confirm@currentStep\" case statement\n\n### Parameters\n\n*   `props` **[object][20]** Values to be assigned to the properties (optional, default `{}`)\n*   `wait` **[number][23]** Millisecond time before the callback passes through the \"confirm@currentStep\" case statement. If negative, immediately. (optional, default `-1`)\n\nReturns **this**&#x20;\n\n## cancel\n\nApply the 'cancel' state to the current step, the callback passes through \"cancel@currentStep\" case statement\n\n### Parameters\n\n*   `props` **[object][20]** Values to be assigned to the properties (optional, default `{}`)\n*   `wait` **[number][23]** Millisecond time before the callback passes through the \"cancel@currentStep\" case statement. If negative, immediately. (optional, default `-1`)\n\nReturns **this**&#x20;\n\n## error\n\nApply the 'error' state to the current step, the callback passes through \"error@currentStep\" case statement\n\n### Parameters\n\n*   `stepName` **[string][19]**&#x20;\n*   `props` **[object][20]** Values to be assigned to the properties (optional, default `{}`)\n*   `wait` **[number][23]** Millisecond time before the callback passes through the \"error@currentStep\" case statement. If negative, immediately. (optional, default `-1`)\n\nReturns **this**&#x20;\n\n[1]: #boot\n\n[2]: #exit\n\n[3]: #confirm\n\n[4]: #cancel\n\n[5]: #error\n\n[6]: #constructor\n\n[7]: #parameters\n\n[8]: #next\n\n[9]: #parameters-1\n\n[10]: #exit-1\n\n[11]: #signal\n\n[12]: #parameters-2\n\n[13]: #confirm-1\n\n[14]: #parameters-3\n\n[15]: #cancel-1\n\n[16]: #parameters-4\n\n[17]: #error-1\n\n[18]: #parameters-5\n\n[19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String\n\n[20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function\n\n[22]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined\n\n[23]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\n","readmeFilename":"readme.md","homepage":"https://github.com/YuichiAgo/procaser#readme","repository":{"type":"git","url":"git+https://github.com/YuichiAgo/procaser.git"},"bugs":{"url":"https://github.com/YuichiAgo/procaser/issues"}}