github.com/outbrain/consul@v1.4.5/ui-v2/app/helpers/service/external-source.js (about) 1 import { helper } from '@ember/component/helper'; 2 import { get } from '@ember/object'; 3 4 export function serviceExternalSource(params, hash) { 5 let source = get(params[0], 'ExternalSources.firstObject'); 6 if (!source) { 7 source = get(params[0], 'Meta.external-source'); 8 } 9 const prefix = typeof hash.prefix === 'undefined' ? '' : hash.prefix; 10 if (source) { 11 return `${prefix}${source}`; 12 } 13 return; 14 } 15 16 export default helper(serviceExternalSource);