'use strict';constPassThrough=require('stream').PassThrough;constmimicResponse=require('mimic-response');constcloneResponse=response=>{if(!(response&&response.pipe)){thrownewTypeError('Parameter `response` must be a response stream.');}constclone=newPassThrough();mimicResponse(response,clone);returnresponse.pipe(clone);};module.exports=cloneResponse;