13 lines
285 B
JavaScript
13 lines
285 B
JavaScript
|
import {helper} from '@ember/component/helper';
|
||
|
import {isEmpty} from '@ember/utils';
|
||
|
|
||
|
export function authorNames([authors]/*, hash*/) {
|
||
|
if (!authors || isEmpty(authors)) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
return authors.mapBy('name').join(', ');
|
||
|
}
|
||
|
|
||
|
export default helper(authorNames);
|