lib/rewriter.js
function to_map(params) {
  var map = {};

  params.forEach(function (param, i) {
    param.index = i;
    map[param.name] = param;
  });

  map.length = params.length;

  return map;
}
function to_map(params) {
  var map = {};

  params.forEach(function (param, i) {
    param.index = i;
    map[param.name] = param;
  });

  map.length = params.length;

  return map;
}
function to_map ( params ) { var map = { } ; params . forEach ( function ( param , i ) { param . index = i ; map [ param . name ] = param ; } ) ; map . length = params . length ; return map ; }
Turn params array into a map for quick lookup.

@param {Array} params
@return {Object}
@api private
Turn params array into a map for quick lookup .