This is a simple functional pipeline implementation that allows the user to execute middleware through a series of sequential steps. It also exposes a compose function for chaining together higher order components.
import pipeline, { Middleware } from "./pipeline";
const firstStep: Middlware<any, any> = async (payload, next) => {
console.log(payload);