function referenceLink(organisation, sourceId, sourceIdType) {
  let link = _get(organisation, ['reference_links', 'links', sourceIdType]);
  if (!link) { return organisation.website; }

  link = link.replace(/{source_id}/g, sourceId);
  link = link.replace(/{source_id_type}/g, sourceIdType);

  return link;
}
/**
 * Get the organisation's reference link for a source ID type
 *
 * Falls back to the organisation's website if there is not a link for the
 * given source ID type
 */
Get the organisation's reference link for a source ID type
Falls back to the organisation's website if there is not a link for the
given source ID type
Get the organisation ' s reference link for a source ID type Falls back to the organisation ' s website if there is not a link for the given source ID type
function referenceLink(organisation, sourceId, sourceIdType) {
  let link = _get(organisation, ['reference_links', 'links', sourceIdType]);
  if (!link) { return organisation.website; }
  link = link.replace(/{source_id}/g, sourceId);
  link = link.replace(/{source_id_type}/g, sourceIdType);
  return link;
}
function referenceLink ( organisation , sourceId , sourceIdType ) { let link = _get ( organisation , [ 'reference_links' , 'links' , sourceIdType ] ) ; if ( ! link ) { return organisation . website ; } link = link . replace ( / {source_id} / g , sourceId ) ; link = link . replace ( / {source_id_type} / g , sourceIdType ) ; return link ; }
Get the organisation's reference link for a source ID type
 Falls back to the organisation's website if there is not a link for the
 given source ID type
Get the organisation ' s reference link for a source ID type Falls back to the organisation ' s website if there is not a link for the given source ID type