Skip to content

Commit

Permalink
[CLEANUP beta] - Remove mapProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
duggiefresh committed Jul 3, 2015
1 parent a069c4d commit dc8e2b9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
13 changes: 0 additions & 13 deletions packages/ember-runtime/lib/computed/reduce_computed_macros.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,6 @@ export function mapBy(dependentKey, propertyKey) {
return map(`${dependentKey}.@each.${propertyKey}`, item => get(item, propertyKey));
}

/**
@method mapProperty
@for Ember.computed
@deprecated Use `Ember.computed.mapBy` instead
@param dependentKey
@param propertyKey
@public
*/
export function mapProperty() {
Ember.deprecate('Ember.computed.mapProperty is deprecated. Please use Ember.computed.mapBy.');
return mapBy.apply(this, arguments);
}

/**
Filters the array by the callback.
Expand Down
2 changes: 0 additions & 2 deletions packages/ember-runtime/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import {
sort,
setDiff,
mapBy,
mapProperty,
filter,
filterBy,
uniq,
Expand Down Expand Up @@ -115,7 +114,6 @@ EmComputed.map = map;
EmComputed.sort = sort;
EmComputed.setDiff = setDiff;
EmComputed.mapBy = mapBy;
EmComputed.mapProperty = mapProperty;
EmComputed.filter = filter;
EmComputed.filterBy = filterBy;
EmComputed.uniq = uniq;
Expand Down
13 changes: 0 additions & 13 deletions packages/ember-runtime/lib/mixins/enumerable.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,19 +358,6 @@ export default Mixin.create({
});
},

/**
Similar to map, this specialized function returns the value of the named
property on all items in the enumeration.
@method mapProperty
@param {String} key name of the property
@return {Array} The mapped array.
@deprecated Use `mapBy` instead
@private
*/

mapProperty: aliasMethod('mapBy'),

/**
Returns an array with all of the items in the enumeration that the passed
function returns true for. This method corresponds to `filter()` defined in
Expand Down
5 changes: 0 additions & 5 deletions packages/ember-runtime/tests/suites/enumerable/mapBy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ suite.test('should work also through getEach alias', function() {
equal(obj.getEach('a').join(''), '12');
});

suite.test('should be aliased to mapProperty', function() {
var obj = this.newObject([]);
equal(obj.mapProperty, obj.mapBy);
});

export default suite;

0 comments on commit dc8e2b9

Please sign in to comment.