Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLEANUP beta] - Remove mapProperty #11648

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;