lib/auth-header.js
function extractParameters(header) {
  var SEPARATOR = /(?: |,)/g;
  var OPERATOR = /=/;

  return header.split(SEPARATOR).reduce(function (parameters, property) {
    var parts = property.split(OPERATOR).map(function (part) {
      return part.trim();
    });

    if (parts.length === 2)
      parameters[parts[0]] = parts[1];

    return parameters;
  }, {});
}
function extractParameters(header) {
  var SEPARATOR = /(?: |,)/g;
  var OPERATOR = /=/;

  return header.split(SEPARATOR).reduce(function (parameters, property) {
    var parts = property.split(OPERATOR).map(function (part) {
      return part.trim();
    });

    if (parts.length === 2)
      parameters[parts[0]] = parts[1];

    return parameters;
  }, {});
}
function extractParameters ( header ) { var SEPARATOR = / (?: |,) / g ; var OPERATOR = / = / ; return header . split ( SEPARATOR ) . reduce ( function ( parameters , property ) { var parts = property . split ( OPERATOR ) . map ( function ( part ) { return part . trim ( ) ; } ) ; if ( parts . length === 2 ) parameters [ parts [ 0 ] ] = parts [ 1 ] ; return parameters ; } , { } ) ; }
Extract parameters from header.

@param {string} header
@returns {object}
Extract parameters from header .