docs: function toaMorgan (format, options) {
    format = format || 'combined'
    options = options || {}
  
    // output on request instead of response
    const immediate = !!options.immediate
    // check if log entry should be skipped
    const skip = typeof options.skip === 'function' ? options.skip : null
    // format function
    const formatLine = compile(formats[format] || format)
    // stream
    const stream = options.stream || process.stdout
  
    return function logger (done) {
      this._startTime = Date.now()
      this._endTime = 0
  
      if (immediate) logRequest.call(this)
      else this.on('end', handle).on('close', handle)
  
      done()
    }
  
    function handle () {
      this.removeListener('end', handle).removeListener('close', handle)
      this._endTime = Date.now()
      logRequest.call(this)
    }
  
    function logRequest () {
      if (skip && skip.call(this)) return
      let line = formatLine.call(this)
      if (line != null) stream.write(line + '\n')
    }
  }