src/hoodieArray.js
function mapFromArray(array, prop) {
      var map = {};
      for (var i = 0; i < array.length; i++) {
        map[ array[i][prop] ] = array[i];
      }
      return map;
    }
function mapFromArray(array, prop) {
      var map = {};
      for (var i = 0; i < array.length; i++) {
        map[ array[i][prop] ] = array[i];
      }
      return map;
    }
function mapFromArray ( array , prop ) { var map = { } ; for ( var i = 0 ; i < array . length ; i ++ ) { map [ array [ i ] [ prop ] ] = array [ i ] ; } return map ; }
Creates a map out of an array be choosing what property to key by
@param {object[]} array Array that will be converted into a map
@param {string} prop Name of property to key by
@return {object} The mapped array. Example:
mapFromArray([{a:1,b:2}, {a:3,b:4}], 'a')
returns {1: {a:1,b:2}, 3: {a:3,b:4}}
Creates a map out of an array be choosing what property to key by