Enumerable#uniqBy()

uniqByEmber.Enumerablepublic

Defined in packages/ember-runtime/lib/mixins/enumerable.js:1082

Returns a new enumerable that contains only items containing a unique property value. The default implementation returns an array regardless of the receiver type.

let arr = [{ value: 'a' }, { value: 'a' }, { value: 'b' }, { value: 'b' }];
arr.uniqBy('value');  // [{ value: 'a' }, { value: 'b' }]

Returns:

Ember.Enumerable
doc_EmberJs
2016-11-30 16:52:02
Comments
Leave a Comment

Please login to continue.