Skip to content

Commit

Permalink
[CLEANUP beta] - Remove filterProperty
Browse files Browse the repository at this point in the history
Deprecated since '13. See: emberjs#3227
  • Loading branch information
duggiefresh committed Jul 1, 2015
1 parent 2e89054 commit be966d4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 36 deletions.
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;

0 comments on commit be966d4

Please sign in to comment.