{"_id":"@deersheep330/function-pipeline","_rev":"6-79b99c51c108f8012cb9749798f69554","name":"@deersheep330/function-pipeline","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@deersheep330/function-pipeline","version":"1.0.0","description":"javascript function pipeline for complex load test","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","gitHead":"a912f39019ca2c2e82f3399fab98a441a56f9293","_id":"@deersheep330/function-pipeline@1.0.0","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-L5pVQAnQi8FrAMSR77bU42RHYGQ6LmZaNS0l0IMTxZDtDL/UKnEeTs7Au7KeDkw/dp/7ZJTZm6IUcFkFxGy7/g==","shasum":"8bb5ee28efcc084cd725b9dcff5e40e27b26977e","tarball":"https://registry.npmjs.org/@deersheep330/function-pipeline/-/function-pipeline-1.0.0.tgz","fileCount":7,"unpackedSize":4131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhWW4CRA9TVsSAnZWagAAJs8P/1sTifihe1GB/AlktuAA\ngH/xrQ9TvhOZ5Fju1b7v2iscdqq3mAwOyQmwPMJ2w2kZg7e8oUKhuH5EDuVU\nG5ErCz9jnLTPkzIPEDNJ2UvM74hA8QyaDzoSwaoGDdHZBKK0W5NfHZBkfVPM\nvG0rw1HTaei4xe/DLJDSP15zDcB3o7RWlUs8Vwoe0v1w2u8/T6W20HMFtIAQ\npWkcWl9iNY2Yzbw0DYCYyPE2ayCSdlRv4GfRf+TE9d6Z0xYwVw2Ejpmdg9Uj\nBhvPLYHwEAtcDnhzNCluQig05ELmMS4+jYHI4hKSFIru+pN9G3U2SDmdZDiR\ndpqKp+mhCQ6r+iTnKevMzrWSGj5iM0tQ7EPcNb3M9Q7IwMYpBP4QmzcqlNEV\nsvcgoryPoyZs71m9zfdkSGpsYExYt3P7ysUpG7Bz/wubLkV1C8zfci9+fLpw\nsM8SLvIEXarS/zTtLGxYTcZmupIEzbNi7zxcoNgPmY3BzyhLu5LCzsffEKFH\nRYiG8IKtlniZqPRfCFS+LAYdS50z/O+REenodYZHG55eZQZW5u56XopAZzAu\nj8igH6mafNLeuQkEz5cA1mWyDTtmjR/GRZ7Qwlu8v5H0rUEqwdPReXXDYkA5\n9j49/vr3Cc/yAvNxb3Y1pWpD+I4gk4yPC9CrQvn5Jm7D72dOYUzkkoAfujlB\nZ2z6\r\n=A4Cr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICsrnzA3hP04hA173RvSqCaXnXOjxOWor4+tYl1MLmWwAiBK/kYrHvvZdEVUKGKlpmZ8YcnlnZ39lPY+bEvIYlFaCA=="}]},"maintainers":[{"name":"deersheep330","email":"deersheep330@gmail.com"}],"_npmUser":{"name":"deersheep330","email":"deersheep330@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/function-pipeline_1.0.0_1602577848504_0.9599833759795973"},"_hasShrinkwrap":false},"1.0.1":{"name":"@deersheep330/function-pipeline","version":"1.0.1","description":"javascript function pipeline for complex load test","main":"index.js","scripts":{"test":"node test.js"},"author":"","license":"ISC","gitHead":"03eff717a546666bef7c71c8d8b328a97b7342cf","_id":"@deersheep330/function-pipeline@1.0.1","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-/AzWkN2dSbUPfCfpjrCT1GddvMtmsJ1kj190jCAek/YX9+TqD+MFZ0dxJJudroyPF/drU9UFKeaQZ62YXG1OvA==","shasum":"61ea5411f95e44663d188b7afb0b0c9011f5bc19","tarball":"https://registry.npmjs.org/@deersheep330/function-pipeline/-/function-pipeline-1.0.1.tgz","fileCount":7,"unpackedSize":15352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfo6lzCRA9TVsSAnZWagAAPYcP/0r2zScQbq9x6TvbLWET\n6bTslGfAIXzKeAj6Brz5ED2U31yBRFt6DnAe2+RIUJWtGetI9ffNkT3TtHou\nvu4UXlptl0Kw7Vo5RcqZ/J0oCRrHftYRzHO2T8j+gSYGUWGbK0qrlriGGGQ8\n3NIuHh22rT8lotkKTj/Byuznfc3UNX/udMqx/Qsy2vAK7eqw2HhK50Nr8ZJu\n27c/QTeMfEfrNA3TVzk3L1e9Qa1Q93bgdDbpn2z0K66qddlG4OTQwqnQwBRq\nlAKdRrJizrZx5r3lXMWB1LYJQS0/eGfOLt9f5LbFq36CXV7MYzbIFglSgPAz\nXE/lRgg2gpaGg6C1QUgUNZFZ1fqCxZAY6CfNmJt5R1WovauI47yuyrfBE4mJ\nMgXnzB4LYmqcGcTqfkjcuttHxFBhzpr6+fuAhXxDvb9978vhCypqmDGBZxPx\nqN/7+GOg4sMS5yjQYZvU4/wXH2ojHCVdq7Werq7fqK0PwmqFxNV67KeL1K1G\nC4x+WxsykQAszB6tQ6T6jlNAPCWh3HU3HVUDtK5GjRdtGBm24aqyCQnUDrCp\nCki6Y9nMdEbT+QXQ6DqmAj4X0VXdmxwGTsgH2oIbTsuS7cwlVW0Tf8Ra+x5Y\n0WJmPASH6mhV1d1lXjKvclQct7aohAB5BkJa32viLELl+m0pFeeShU9z9qAd\nUAMC\r\n=PXyW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDji0FDY+CnjDKhfzIVrOaed4DalDe3YdSEVEv9IMjQxgIhAJAEe73g9/B0+Upr5kN/zhsba/6SKDGzBw3h6ggsB0RU"}]},"_npmUser":{"name":"deersheep330","email":"deersheep330@gmail.com"},"directories":{},"maintainers":[{"name":"deersheep330","email":"deersheep330@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/function-pipeline_1.0.1_1604561267195_0.46214522165113214"},"_hasShrinkwrap":false},"1.0.2":{"name":"@deersheep330/function-pipeline","version":"1.0.2","description":"javascript function pipeline for complex load test","main":"index.js","scripts":{"test":"node test.js"},"author":"","license":"ISC","gitHead":"4b9ad342afa516649970e5b58f922455938b6968","_id":"@deersheep330/function-pipeline@1.0.2","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-SkBLhFcuLVJ/+KJrTMSisweN7EXEI+9oLrtlHchqnyIedu2P4hNPKm89oKL6fcUe0d2Rc/8I2+QvJk2Zl9quFA==","shasum":"b4a04afa4fbfeb6811820d673e8b90eb22309264","tarball":"https://registry.npmjs.org/@deersheep330/function-pipeline/-/function-pipeline-1.0.2.tgz","fileCount":7,"unpackedSize":15431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfo7drCRA9TVsSAnZWagAAhzcP/A1sap2td/c8QRar0+tA\nYG8YtkslZRmW/8pikDWK0m5k855sRyWB9jQ8od+mNz0oZOOm6q4AsLyK8RPc\nsSkZLycZCqWOKIUKBiqY/nRxTAlPxw5ZsoCI4qUIiFsPyUPLkg7503j1RlZw\nI8QN9N9shvFd8VfxGzL6jDNcyp8cfqw/+L9kj+wlBJs2yiuCNw0lgWudRNby\ncrRGeedmm4pqLWNOBBnh3mk/Dyha3lW3Tiaof8+eOF7xhhQhvhSFdTxfPEMz\nTdGIQ9UKfFl3rn3a2kMt6pmZGm3bc9s14kUaiG849p/DwgImv6cvmzV4i+7n\nLqk+MBvhkv3FTVUDDpFaQf4TydZUMbzqNSfoqbN19MIEIMwVcXxSOzqUnve1\n4KDQdn38cRiqy579KpeIXPMfR2sbbwxO/vFtwO1/42dXmFv6JHyhQzgw31Qq\nd8ClZRh4B9+QjJtgdcS+EgP/z0BQK8R4Sb+x3IkveM2R1ICmRSPHi2M8uNSU\nGL8j5SCmzpx2eiWhMM6tTZSkJcWZ1B3i5EMAKxDpRh/8FVHu8IZD6Cr51xEG\nQ0DEJMKvXRLCgqsOEN/ejLkknBXrkxAmSNcgT3zVoA1FJCOTgU0T9y7FRESw\nHxuVmHQ3CU+ft/AIPZ83sWSlmoLxpGuT8bPxb0nBkuoe4ptH0RogcJH080DH\nRXLS\r\n=suTb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEIsAm4Ftq5sakN9hinP4h2E8vOsUz+z7oJw96AP9qS8AiEA7PqMMwthOpelbT06xV+Ipk5+EzmKF6ZzhDxp8uympAw="}]},"_npmUser":{"name":"deersheep330","email":"deersheep330@gmail.com"},"directories":{},"maintainers":[{"name":"deersheep330","email":"deersheep330@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/function-pipeline_1.0.2_1604564842817_0.37179736000575425"},"_hasShrinkwrap":false},"1.0.3":{"name":"@deersheep330/function-pipeline","version":"1.0.3","description":"javascript function pipeline for complex load test","main":"index.js","scripts":{"test":"node test.js"},"author":"","license":"ISC","gitHead":"c313decfb031df83980b45ff8e8d82d841cec0ec","_id":"@deersheep330/function-pipeline@1.0.3","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-e3Nm9kKvgEdfcGXk4nvhob8Ni3KL+911FHM+mNZaPainAEhTkW3hknY5GhiWxRYjBjabHDzEV5kN0BHDswQ5xA==","shasum":"72ad276f073bd504377d063ff00b7cc4ed3d5598","tarball":"https://registry.npmjs.org/@deersheep330/function-pipeline/-/function-pipeline-1.0.3.tgz","fileCount":7,"unpackedSize":15556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpJ9HCRA9TVsSAnZWagAAV4AP+gLQxfGD0UWoXGwRzm7W\nLWQQsi7EJ2FF8dRog6UWxMdXw3bi16q4bQZKDky5TMwE4mYfPjYWRf0gg/0Y\nZpUn9snUvs9jhRDpn0fmu4kRdHbWCxGKpLyt1HJjc2q8Sny5kHQ7CDZaoYBP\nXE7Q9zNlWmLgv5hDBfcClPhWLO7l5MK7pnk1KzTov/dre2ndRrnuPNflzo4r\nH2tM6hMIc1KGb1hfJ63IejZ3kWfh9MFH1cV6mtEURVO6v+UHpWLC+cXar2NE\nCL4WduJJKeToFXdTX5QUnH0c0T3x5m20BW7UPxxNDCJA4RreOd4lApbDwMNi\nPaWw+LTsBmtK/YECU1R0PXuC05BT57/CO1pawUX5VJ4nMXNkGZswsE6Sk07k\nkWZDR6KCPgBu6yfaaeH3QELpaOz0x39brp2fCkmEymW8Fhs6Y3/CTjvQxYrF\nxbvbdo22LAgR8KBu4rEObBViRhYhdBXvNLq6e3QeEep5sF1oTJ+XdXZRsarL\nRRhKyAHS42dUEyUmgXaHTvjrGX9Pb3A36WBg9WqPQMMDtiNsR8Nvf0oYiN6p\nOWtYMvUIIIspreVNwO5Cvos9eotl7eHgWRj+7aFFHRL5GQPTTQhU4SU6tr6k\nGcCkTWeC6VWjEj1qp8NWeSvaK+pF9EcN0GnAIexbdnMAfEBA7UTQcTAMJ2k7\n/d1E\r\n=ypJz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBf5kS6GlduqJC9pI/CeZkyViuznrgI8WJ62z0/MEXo1AiEAwSOUBqBxDbnxsYc+LL9xkJCElY8MoNBAQ1ij1hhTejI="}]},"_npmUser":{"name":"deersheep330","email":"deersheep330@gmail.com"},"directories":{},"maintainers":[{"name":"deersheep330","email":"deersheep330@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/function-pipeline_1.0.3_1604624198636_0.026594374178201763"},"_hasShrinkwrap":false},"1.0.4":{"name":"@deersheep330/function-pipeline","version":"1.0.4","description":"javascript function pipeline for complex load test","main":"index.js","scripts":{"test":"node test.js"},"author":"","license":"ISC","gitHead":"5e1c2d2581344c26531ed319b14093b86ecdd7c7","_id":"@deersheep330/function-pipeline@1.0.4","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-adMspMESRrdROIXKd2mPxF7CyMhaWzD0prtleGpJOtHocpwZ4DXn3Ce1f5zkSovuf5/iQ6KyGXMS+evzHlq5FA==","shasum":"c3d4c9be5ed242a814301f0e8a9b046c429978e2","tarball":"https://registry.npmjs.org/@deersheep330/function-pipeline/-/function-pipeline-1.0.4.tgz","fileCount":7,"unpackedSize":15871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpKjnCRA9TVsSAnZWagAAtv4QAJE79+2wSDkq7CGp8HiP\nPNJ1Sx8Vd7dpqMqBAsNTTS6TilrGw777yZCUG8f0eVdRy//seM7VDELTtGRA\nkJq94FRhT+k003MCXodkHweRNeY3jbBMXNSwqyKPWSntiTBN2+jNrYDToY3g\nZLg8ymNriCumKrzE+BnZcQzz2freun87s7umzJZFzklfWy0n6KW4vUI8cv9J\n5abwux/6EFcWvkTRU4/8VE2furRaFcyMcH6S4EpXidpjLuSmtPFrisO/M9vW\nsqLwFDgHYUxxBPbjoznWPOCHlKSrSMsVwzQ0XrSnN1oneHdqephaMfvSlQ0h\nSoDuCFjHbRKUenWTZ7WwLbdXiRCT2LGEGxPXl4wUAGlG56mgIZJ7BgsXbD6s\nPZwEJe/r4uPgKhuzjR4djO3xqU8fRaP1wQj7tP0W8Njtl3v182c71lIPOK0t\nHtxBYqVIFNMbz9GJFloEv741qhJWu7Ye8YLP7Yft3w/ivRBT8sFOVN9QbGv2\nnJQ2OnL5cmtA7r6IgaxC8ns0Nq5tyrKQJwGyP1Saa8SGF/BK8WbwhxEvynVT\nviS9e6RkRQupAtl3sitC0rKGhvXlF9zHyMp/bdtVEx4N6hLQlKkqwjVHy83I\ng3lQvcjPVjjSPcqd9486X0JO/RkCu8I51lasX9skaTlT90Zy+pY3D4F3XMPj\nRpp6\r\n=nnVj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICR8Wd/2GHJEwsih2FZLgjjSFHfaR0hwSkJ3K0mpyjJ/AiEA9JoSQHnov1fj2UVwCBIRjRODA7Ccm+6mwWP7TesKVto="}]},"_npmUser":{"name":"deersheep330","email":"deersheep330@gmail.com"},"directories":{},"maintainers":[{"name":"deersheep330","email":"deersheep330@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/function-pipeline_1.0.4_1604626662573_0.00976646052293817"},"_hasShrinkwrap":false},"1.0.5":{"name":"@deersheep330/function-pipeline","version":"1.0.5","description":"javascript function pipeline for complex load test","main":"index.js","scripts":{"test":"node test.js"},"author":"","license":"ISC","gitHead":"d5672a64e61292b52048cd674cc208c13d4b77e5","_id":"@deersheep330/function-pipeline@1.0.5","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Zpq9PvQ+xNXfBQ1eSLKp0o8pdJ5ye6tIxMid4RhPF1dTIP2aBx8wgJnsIksQahLKol7notRRGt1kaWXHLAf/Qg==","shasum":"0b246b48be3fcebd18e5b8c59afe18029eb9bc10","tarball":"https://registry.npmjs.org/@deersheep330/function-pipeline/-/function-pipeline-1.0.5.tgz","fileCount":7,"unpackedSize":15873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpORhCRA9TVsSAnZWagAAZiwP/1OgQbybbwJaq9IVG62s\nTOdpuKnlTm8VNhWRpHhKiAKNFpiLVDJDUKkUKkAGUFE5fRE2te06fq9lfgc5\nrQdozHvSk5CS02KSB1dLx9NLuv4UmSgwvUtX4/uVt5Kw8YQlQ7/4izlupMrc\n1YnMyD7SePBn0ijQ3O6eGOdd05GJvWbYWzW6AZIPJBUW9FQpYe1fixVmsUSp\nOKnxu55grip2NWeEwHQb8lmwIRexOPBFZpIllVlJvePlgu4nWLzm+Zb1ukYr\no5KUt96NK7IHvUxG280v4HnRqbinO27NSaGEsOiXo4OS15VVvLeBrPU+HKxw\nV1AR/u5ZldYem0Fzz+j9W05nl62UFongjp0clucdvj1QPZIJert+sO1E7bd8\n9nYb4akp5gyZqCH8XsJMavqcK8vvopsQQYhAy48AIAVonWyXRvJHTwrkl8F7\nAH/K77gn5myu6hW+M905LNN+6WcfErlWx/BKut09LMYr4isMH3xD2WmUgvd6\nOgXU6Ct2ramcP8SkEoXIWk7a1JCX8oIyvKDToIfaZ6SznBaBHkbd82VqXmOC\nvZKuJtWHJg/xX86ZTG9l82RLZFVpVwMPAA5RhwZJKOZog2SPR7JDq+iGqUZv\n84rkfAlh3OT/bM+CXHMXoao/vHDrUbOhkZ4A+ysQNUpqM3GKe2yxmPxG6Ev8\nnjVU\r\n=hnN4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxw7G9j7xpGhw+6JKnzoe9N7kn0rX9oTekN61LleX82QIgcKI3TB4GUok7NrXGCDGofNVuhH4p1XZIKPsrbjjPnpA="}]},"_npmUser":{"name":"deersheep330","email":"deersheep330@gmail.com"},"directories":{},"maintainers":[{"name":"deersheep330","email":"deersheep330@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/function-pipeline_1.0.5_1604641888863_0.2799245517739366"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-13T08:30:48.444Z","1.0.0":"2020-10-13T08:30:48.603Z","modified":"2022-04-05T03:37:40.455Z","1.0.1":"2020-11-05T07:27:47.389Z","1.0.2":"2020-11-05T08:27:22.979Z","1.0.3":"2020-11-06T00:56:38.779Z","1.0.4":"2020-11-06T01:37:42.813Z","1.0.5":"2020-11-06T05:51:28.982Z"},"maintainers":[{"name":"deersheep330","email":"deersheep330@gmail.com"}],"description":"javascript function pipeline for complex load test","license":"ISC","readme":"# function-pipeline\n\n__function-pipeline makes it easy to perform very complex, unstable load test.__\n\n## Contents\n\n- [Use Case](#use-case)\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n- [Demo](#demo)\n\n## Use Case\n\n__Imagine your boss want you to load test the following process on a system:__\n- __(Step 1):__ User have to login to the system.\n- __(Step 2):__ User upload a file to the system. __e.g. A file contains tons of numbers.__\n- __(Step 3):__ User wait for the system processing the uploaded file. __e.g. The system have to parse all numbers in the file.__\n- __(Step 4):__ User can simultaneously send multiple requests the the system to perform customized operations upon the processed data and wait for results. __e.g. Send 3 requests to ask the system to calculate stddev, median and avg at the same time.__\n\n__Your boss want to know the system can support how many users performing this process before it collapses.__\n\n__So you're load-testing a process consists of multiple API calls instead of a single API call.__\n\n## Getting Started\n\nInstall this module using npm:\n\n```javascript\nnpm i @deersheep330/function-pipeline\n```\n\nImport this module:\n\n```javascript\nconst { FunctionPipeline, OnError } = require('@deersheep330/function-pipeline');\n```\n\n## Usage\n\n- __Get pipeline instance__\n\n```javascript\nlet pipeline = new FunctionPipeline()\n```\n\n- __Define a step by adding functions into the pipeline__\n\nA step is defined by calling the add(onError, ... functions) method of pipeline instance.\n\nYou can pass arbitrary numbers of functions into the \"add\" method to define a step contains multiple functions. These functions would all be called at the same time and this step is finished if and only if all the functions are resolved or rejected. \n\nThe onError argument could be __OnError.RETRY__, __OnError.START_OVER__ or __OnError.CONTINUE__.\n\nFor __OnError.RETRY__, if any of functions in this step is rejected, the pipeline would re-run this step again.\n\nFor __OnError.START_OVER__, if any of functions in this step is rejected, the pipeline would re-run from the first step again.\n\nFor __OnError.CONTINUE__, if any of functions in this step is rejected, the error would be ignored, which means: the pipeline would proceed to the next step when all the functions in the step are returned, no matter it's resolved or rejected. \n\nThe following code defined a 3-steps pipeline. Each step contains only one function:\n\n- __(Step 1):__ login\n- __(Step 2):__ download\n- __(Step 3):__ logout\n\nThis pipeline would run these 3 steps sequentially.\n\nIf __Step 1__ is rejected, it would try to __Step 1__ again.\n\nIf __Step 2__ is rejected, it would start from __Step 1__ again.\n\nIf __Step 3__ is rejected, it would ignore error and continue.\n\nBy calling the perform() method of pipeline instance, the pipeline would start to run these defined steps.\n\n```javascript\nlet login = async () => { await request('/login') }\nlet download = async () => { await request('/download') }\nlet logout = async () => { await request('/logout') }\n\npipeline.add(OnError.RETRY, login)\n        .add(OnError.START_OVER, download)\n        .add(OnError.CONTINUE, logout)\n        .perform()\n```\n\n- __Define a step runs multiple functions parallelly__\n\nBy passing multiple functions into a \"add\" method, these functions would all be called at the same time and this step is finished unless the functions are resolved or rejected. Which means: These functions are run parallelly instead of sequentially.\n\n```javascript\nlet task1 = async () => { await doSomething() }\nlet task2 = async () => { await doSomething() }\nlet task3 = async () => { await doSomething() }\n\npipeline.add(OnError.CONTINUE, task1, task2, task3).perform()\n```\n\n- __Function parameters__\n\nWhat if a function is dependent on another function's result?\n\ne.g. There are two functions: login & download. \"login\" returns a cookie, and \"download\" requires a logined user so it needs the cookie returned by \"login\".\n\n```javascript\nlet login = async () => { await request('/login') }\nlet download = async (cookie) => { await request('/download', cookie) }\n```\n\nFunctionPipeline already take care this for you :)\n\nOnce a function resolved in the pipeline instance, the resolved value would be stored in a dictionary in the pipeline instance. (So it requires the resolved value to be a key-value pair.) \n\nIf a step contains a function which has arguments, the arguments names would be parsed, and try to find these arguments names in the dictionary, and automatically pass the value found into the function.\n\nSo back to our example: the \"login\" and \"download\" functions just need a little modification to follow FunctionPipeline's design:\n\n```javascript\n// \"login\" needs to return a key-value pair, and the key has to exactly match \"download\"'s argument name\n// the key-value pair would be stored in a dictionary\nlet login = async () => { let cookieVal = await request('/login'); resolve({ cookie: cookieVal }) }\n\n// after parsing, an argument named \"cookie\" is found.\n// automatically lookup the dictionary and try to find a key named \"cookie\"\n// if it's found, pass the value of the key to this \"download\" function\nlet download = async (cookie) => { await request('/download', cookie) }\n```\n\n- __Fetching logs__\n\nThere's an event emitter in the pipeline instance which emits different kinds of events so you can get the realtime progress and status of the pipeline:\n\n```javascript\nlet pipeline = new FunctionPipeline()\n\n// verbose logs, current steps, function's resolved or rejected\npipeline.emitter.on('log', function(data) {\n    console.log(data)\n})\n// records of test results, the time consuming of each functions\npipeline.emitter.on('record', function(data) {\n    console.log(data)\n})\n// contains error logs only, function's rejected reason\npipeline.emitter.on('err', function(data) {\n    console.log(data)\n})\n\n// build the pipeline and run it\nawait pipeline.add(OnError.RETRY, login)\n              .add(OnError.RETRY, upload)\n              .perform()\n```\n\n## Demo\n\nYou can find more detailed example at [this project's test code](https://github.com/deersheep330/function-pipeline/blob/master/test.js).\n","readmeFilename":"README.md"}