code: function toLookup(key, data) {
  		if (!data)
  			return {};
  
  		var obj = {},
  				keys = Object.keys(data);
  		
  		for (var i = 0, il = keys.length; i < il; i++) {
  			var id,
  					k = keys[i],
  					v = data[k];
  
  			if (key) {
  				id = D.get(v, key);
  			} else {
  				id = ('' + v);
  			}
  
  			if (!id)
  				continue;
  
  			obj[id] = v;
  		}
  
  		return obj;
  	}
docs: @function {toLookup} This takes an Array and returns a reference map for quick lookup.
  @param {String} {key} Key to match on all objects. If key is undefined or null, the index will be used instead.
  @param {Array} {data} Array to create map from
  @return {Object} Each key in the object will be the value in the Array specified by 'key'
  @see function:devoir.data.extract
  @example {javascript}
  var myMap = D.data.toLookup('id', [
  {
  id:'derp',
  field: 'derp'
  },
  {
  id:'dog',
  field: 'dog'
  },
  {
  id:'cat',
  field: 'cat'
  }
  ]);
  
  myMap === {
  'derp': {
  id:'derp',
  field: 'derp'
  },
  'dog': {
  id:'dog',
  field: 'dog'
  },
  'cat': {
  id:'cat',
  field: 'cat'
  }
  };