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 filterProperty #11611

Merged
merged 1 commit into from
Jul 3, 2015
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
14 changes: 0 additions & 14 deletions packages/ember-runtime/lib/computed/reduce_computed_macros.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,20 +310,6 @@ export function filterBy(dependentKey, propertyKey, value) {
return filter(`${dependentKey}.@each.${propertyKey}`, callback);
}

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

/**
A computed property which returns a new array with all the unique
elements from one or more dependent arrays.
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 @@ -56,7 +56,6 @@ import {
mapProperty,
filter,
filterBy,
filterProperty,
uniq,
union,
intersect
Expand Down Expand Up @@ -119,7 +118,6 @@ EmComputed.mapBy = mapBy;
EmComputed.mapProperty = mapProperty;
EmComputed.filter = filter;
EmComputed.filterBy = filterBy;
EmComputed.filterProperty = filterProperty;
EmComputed.uniq = uniq;
EmComputed.union = union;
EmComputed.intersect = intersect;
Expand Down
14 changes: 0 additions & 14 deletions packages/ember-runtime/lib/mixins/enumerable.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,20 +460,6 @@ export default Mixin.create({
return this.filter(iter.apply(this, arguments));
},

/**
Returns an array with just the items with the matched property. You
can pass an optional second argument with the target value. Otherwise
this will match any property that evaluates to `true`.

@method filterProperty
@param {String} key the property to test
@param {String} [value] optional value to test against.
@return {Array} filtered array
@deprecated Use `filterBy` instead
@private
*/
filterProperty: aliasMethod('filterBy'),

/**
Returns an array with the items that do not have truthy values for
key. You can pass an optional second argument with the target value. Otherwise
Expand Down
6 changes: 0 additions & 6 deletions packages/ember-runtime/tests/suites/enumerable/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,4 @@ suite.test('should not match undefined properties without second argument', func
deepEqual(obj.filterBy('foo'), ary.slice(0, 2), 'filterBy(\'foo\', 3)\')');
});

suite.test('should be aliased to filterProperty', function() {
var ary = [];

equal(ary.filterProperty, ary.filterBy);
});

export default suite;