index.js
function getErrorHeaders (err) {
  if (!err.headers || typeof err.headers !== 'object') {
    return undefined
  }

  var headers = Object.create(null)
  var keys = Object.keys(err.headers)

  for (var i = 0; i < keys.length; i++) {
    var key = keys[i]
    headers[key] = err.headers[key]
  }

  return headers
}
function getErrorHeaders (err) {
  if (!err.headers || typeof err.headers !== 'object') {
    return undefined
  }

  var headers = Object.create(null)
  var keys = Object.keys(err.headers)

  for (var i = 0; i < keys.length; i++) {
    var key = keys[i]
    headers[key] = err.headers[key]
  }

  return headers
}
function getErrorHeaders ( err ) { if ( ! err . headers || typeof err . headers !== 'object' ) { return undefined } var headers = Object . create ( null ) var keys = Object . keys ( err . headers ) for ( var i = 0 ; i < keys . length ; i ++ ) { var key = keys [ i ] headers [ key ] = err . headers [ key ] } return headers }
Get headers from Error object.

@param {Error} err
@return {object}
@private
Get headers from Error object .