index.js
function(firstName, lang) {
  if (lang && male[firstName] && male[firstName][lang] && female[firstName] && female[firstName][lang]) {
    return 'unisex';
  } else if (lang && male[firstName] && male[firstName][lang]) {
    return 'male';
  } else if (lang && female[firstName] && female[firstName][lang]) {
    return 'female';
  } else if (male[firstName] && female[firstName]) {
    return 'unisex';
  } else if (male[firstName]) {
    return 'male';
  } else if (female[firstName]) {
    return 'female';
  }
  return 'unknown';
}
function(firstName, lang) {
  if (lang && male[firstName] && male[firstName][lang] && female[firstName] && female[firstName][lang]) {
    return 'unisex';
  } else if (lang && male[firstName] && male[firstName][lang]) {
    return 'male';
  } else if (lang && female[firstName] && female[firstName][lang]) {
    return 'female';
  } else if (male[firstName] && female[firstName]) {
    return 'unisex';
  } else if (male[firstName]) {
    return 'male';
  } else if (female[firstName]) {
    return 'female';
  }
  return 'unknown';
}
function ( firstName , lang ) { if ( lang && male [ firstName ] && male [ firstName ] [ lang ] && female [ firstName ] && female [ firstName ] [ lang ] ) { return 'unisex' ; } else if ( lang && male [ firstName ] && male [ firstName ] [ lang ] ) { return 'male' ; } else if ( lang && female [ firstName ] && female [ firstName ] [ lang ] ) { return 'female' ; } else if ( male [ firstName ] && female [ firstName ] ) { return 'unisex' ; } else if ( male [ firstName ] ) { return 'male' ; } else if ( female [ firstName ] ) { return 'female' ; } return 'unknown' ; }
Match gender type from the first name
Match gender type from the first name