demo/www/lib/angular-ui-router/src/common.js
function indexBy(array, propName) {
  var result = {};
  forEach(array, function(item) {
    result[item[propName]] = item;
  });
  return result;
}
function indexBy(array, propName) {
  var result = {};
  forEach(array, function(item) {
    result[item[propName]] = item;
  });
  return result;
}
function indexBy ( array , propName ) { var result = { } ; forEach ( array , function ( item ) { result [ item [ propName ] ] = item ; } ) ; return result ; }
like _.indexBy when you know that your index values will be unique, or you want last-one-in to win
like _ . indexBy when you know that your index values will be unique or you want last - one - in to win