by Tade0 · 3y ago · 0 comments
pipe((p) => ([
"hello",
p.concat("!"),
send,
p.status,
console.log
]));
Where `p` stands for Proxy to the previous result. Under the hood it would just return an object describing the name of the called method and arguments passed.The pipe function would then iterate over the array, calling methods as described.
It's not immediately clear what should happen when a method's return type is a function, but I suppose this can be handled via convention.
gulp.src(config.src)
.pipe(uglify())
.pipe(gulp.dest(config.dest))
.pipe(size());
[1] https://www.npmjs.com/package/gulp pipeSync(p => [
"hello",
p + " world",
console.log
]);