function resolve(str) {

  if (typeof str !== 'object')
    return undefined;

  let langs = Object.keys(str);
  if (!langs.length)
    return undefined;

  return str.en || str[langs[0]];

}
// Quickly resolve multilingual string to English or first non-English language
Quickly resolve multilingual string to English or first non-English language
Quickly resolve multilingual string to English or first non - English language
function resolve(str) {
  if (typeof str !== 'object')
    return undefined;
  let langs = Object.keys(str);
  if (!langs.length)
    return undefined;
  return str.en || str[langs[0]];
}
function resolve ( str ) { if ( typeof str !== 'object' ) return undefined ; let langs = Object . keys ( str ) ; if ( ! langs . length ) return undefined ; return str . en || str [ langs [ 0 ] ] ; }
Quickly resolve multilingual string to English or first non-English language
Quickly resolve multilingual string to English or first non - English language