@edorsey/pipeline
v1.0.0
Published
Utility function that provides a pipeline-like operator for JavaScript
Downloads
5
Readme
Pipeline
This module implements a pipeline-like pattern in JavaScript:
const p = require("pipeline");
function functionOne(data) {
data.one = true;
return data;
}
function functionTwo(data) {
data.two = true;
return data;
}
let result = p({}).flow([
functionOne,
functionTwo
]);
console.log("result", result);
//> result { one: true, two: true }