# Pipeline to process ordered synchronous and asynchronous functions ![node-current](https://img.shields.io/node/v/mixed-pipeline) ![GitHub package.json version](https://img.shields.io/github/package-json/v/jcschmidig/mixed-pipeline) ### 1. Overview Have you ever landed in the promise hell? Especially mixing synchronous and asynchronous functions? In this case, this module might be of some help for you. It has two parts: - Building the pipeline and - executing the pipeline (reusable) You can use direct or promise based functions as you would use synchronous ones and error checking is included behind the scenes. Just write pure functions and let the pipeline handle the rest. ### 2. Prerequisites This package needs node version 12 or higher. ### 3. Installation `npm install mixed-pipeline` ### 4. Initialization `const pipe = require('mixed-pipeline/v4')` or `const { v4:pipe } = require('mixed-pipeline')` ### 5. API #### 5.1 Building the Pipeline The pipeline constructor accepts two positioned arguments - an input as an array of the following structure - ``: a simple function to execute, storing its result in an object under `` - `[, ...]`: an array of functions executed simultaneously - `[, , ...]`: an array of one function and one or more other pipelines executed simultaneously. the function should return an array of values which are being launched with every pipeline and which appear in the corresponding pipeline as { execute } property - `