const _ = require('lodash');

exports.processHeaders = function processHeaders(headerParams, options) {
  if (headerParams) {
    const customHeaders = _.isArray(headerParams) ? headerParams : [ headerParams ];
    customHeaders.forEach(header => {
      const [key, value] = header.split(':').map(str => str.trim());
      options.headers[key] = value;
    });
  }
}


const _ = require('lodash');

exports.processHeaders = function processHeaders(headerParams, options) {
  if (headerParams) {
    const customHeaders = _.isArray(headerParams) ? headerParams : [ headerParams ];
    customHeaders.forEach(header => {
      const keyValuePair = header.split(':').map(str => str.trim());
      options.headers[keyValuePair[0]] = keyValuePair[1];
    });
  }
}


Remove destructuring for node 4 compatibility
Remove destructuring for node 4 compatibility
