src/computed-properties/map.js
function MapProperty(sourceExpression, keyExpression, resultExpression, removeExpression) {
  var parts = sourceExpression.split(/\s+in\s+/);
  this.sourceExpression = parts.pop();
  this.itemName = parts.pop();
  this.keyExpression = keyExpression;
  this.resultExpression = resultExpression;
  this.removeExpression = removeExpression;
}
function MapProperty(sourceExpression, keyExpression, resultExpression, removeExpression) {
  var parts = sourceExpression.split(/\s+in\s+/);
  this.sourceExpression = parts.pop();
  this.itemName = parts.pop();
  this.keyExpression = keyExpression;
  this.resultExpression = resultExpression;
  this.removeExpression = removeExpression;
}
function MapProperty ( sourceExpression , keyExpression , resultExpression , removeExpression ) { var parts = sourceExpression . split ( / \s+in\s+ / ) ; this . sourceExpression = parts . pop ( ) ; this . itemName = parts . pop ( ) ; this . keyExpression = keyExpression ; this . resultExpression = resultExpression ; this . removeExpression = removeExpression ; }
Creates an object hash with the key being the value of the `key` property of each item in `sourceExpression` and the
value being the result of `expression`. `key` is optional, defaulting to "id" when not provided. `sourceExpression`
can resolve to an array or an object hash.
@param {Array|Object} sourceExpression An array or object whose members will be added to the map.
@param {String} keyExpression The name of the property to key against as values are added to the map.
@param {String} resultExpression [Optional] The expression evaluated against the array/object member whose value is
added to the map. If not provided, the member will be added.
@return {Object} The object map of key=>value
Creates an object hash with the key being the value of the key property of each item in sourceExpression and the value being the result of expression . key is optional defaulting to id when not provided . sourceExpression can resolve to an array or an object hash .