function pipe(res, bufferOrStream) {
  // Pseudo API and Koa API
  if (typeof res.stream === "function") {
    // Writable stream into Readable stream
    res.stream(bufferOrStream);
    return;
  }

  // Node.js API and Express API and Hapi API
  bufferOrStream.pipe(res);
}
@template {ServerResponse & ExpectedServerResponse} Response
@param {Response} res res
@param {import("fs").ReadStream} bufferOrStream buffer or stream