How to leverage the "Open all external links in a new tab" setting in site customizations

If they wanted to check the site setting, they could do something like this within that existing customization

// set up the siteSettings and target variable:
const siteSettings = api.container.lookup('site-settings:main');
const target = siteSettings.default_other_external_links_in_new_tab ? "_blank" : ""


// modify the if statement where the link is created to use the target variable: 
if (userFields && userFields[userFieldId]) {
  const url = "http://myawesomewebsite.com/user/" + userFields[userFieldId];
  const link = `<a href="${url}" target="${target}">${url}</a>`;
  return Ember.Object.create({ link, name: externalUserIdField.get('name') });
} else {
  return null;
}