Opal-Estate-Pro/node_modules/axios/lib/helpers/normalizeHeaderName.js
2019-09-13 11:27:52 +07:00

13 lines
357 B
JavaScript

'use strict';
var utils = require('../utils');
module.exports = function normalizeHeaderName(headers, normalizedName) {
utils.forEach(headers, function processHeader(value, name) {
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
headers[normalizedName] = value;
delete headers[name];
}
});
};