index.js
function combineHeaders(...args) {
  const combinedLower = {};
  const combined = {};
  args.reverse();
  args.forEach((headers) => {
    if (headers) {
      Object.keys(headers).forEach((name) => {
        const nameLower = name.toLowerCase();
        if (!hasOwnProperty.call(combinedLower, nameLower)) {
          combinedLower[nameLower] = true;
          combined[name] = headers[name];
        }
      });
    }
  });
  return combined;
}
function combineHeaders(...args) {
  const combinedLower = {};
  const combined = {};
  args.reverse();
  args.forEach((headers) => {
    if (headers) {
      Object.keys(headers).forEach((name) => {
        const nameLower = name.toLowerCase();
        if (!hasOwnProperty.call(combinedLower, nameLower)) {
          combinedLower[nameLower] = true;
          combined[name] = headers[name];
        }
      });
    }
  });
  return combined;
}
function combineHeaders ( ... args ) { const combinedLower = { } ; const combined = { } ; args . reverse ( ) ; args . forEach ( ( headers ) => { if ( headers ) { Object . keys ( headers ) . forEach ( ( name ) => { const nameLower = name . toLowerCase ( ) ; if ( ! hasOwnProperty . call ( combinedLower , nameLower ) ) { combinedLower [ nameLower ] = true ; combined [ name ] = headers [ name ] ; } } ) ; } } ) ; return combined ; }
Combines HTTP headers objects.
With the capitalization and value of the last occurrence.
@private
Combines HTTP headers objects . With the capitalization and value of the last occurrence .