uniq (propertyKey) Ember.ComputedProperty
public
A computed property which returns a new array with all the unique elements from one or more dependent arrays.
Example
let Hamster = Ember.Object.extend({ uniqueFruits: Ember.computed.uniq('fruits') }); let hamster = Hamster.create({ fruits: [ 'banana', 'grape', 'kale', 'banana' ] }); hamster.get('uniqueFruits'); // ['banana', 'grape', 'kale']
Parameters:
-
propertyKey
String
Returns:
-
Ember.ComputedProperty
- computes a new array with all the unique elements from the dependent array
Please login to continue.