TryGhost/Ghost

View on GitHub
ghost/admin/app/helpers/author-names.js

Summary

Maintainability
A
0 mins
Test Coverage
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);