All files / lib/helpers normalizeHeaderName.js

66.67% Statements 4/6
75% Branches 3/4
100% Functions 2/2
66.67% Lines 4/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13    1x   1x 58x 412x            
'use strict';
 
var utils = require('../utils');
 
module.exports = function normalizeHeaderName(headers, normalizedName) {
  utils.forEach(headers, function processHeader(value, name) {
    Iif (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
      headers[normalizedName] = value;
      delete headers[name];
    }
  });
};