This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
Allows pipe transform return to be optional
·
461 commits
to master
since this release
This avoids redundantly returning the received response from a pipe transformation when mutating said response:
const withCaching = pipe(
(req, res) => {
res.headers.append("Cache-Control", "max-age=86400");
// no return statement required
}
);