Skip to content

Commit

Permalink
Merge pull request #18464 from Frozenfire92/18228-getEach
Browse files Browse the repository at this point in the history
[DOC] #18228 Add description and example to EmberArray.getEach documentation
  • Loading branch information
locks authored Oct 26, 2019
2 parents 430b47a + b9abf1a commit 648c6c3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/@ember/-internals/runtime/lib/mixins/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,20 @@ const ArrayMixin = Mixin.create(Enumerable, {
},

/**
Alias for `mapBy`
Alias for `mapBy`.
Returns the value of the named
property on all items in the enumeration.
```javascript
let people = [{name: 'Joe'}, {name: 'Matt'}];
people.getEach('name');
// ['Joe', 'Matt'];
people.getEach('nonexistentProperty');
// [undefined, undefined];
```
@method getEach
@param {String} key name of the property
Expand Down

0 comments on commit 648c6c3

Please sign in to comment.