{"size": 719, "ext": "js", "max_stars_repo_path": "src/toBaseline.js", "max_stars_repo_name": "nodef/extra-string", "max_stars_repo_stars_event_min_datetime": "2020-01-24T22:32:39.000Z", "max_stars_repo_stars_event_max_datetime": "2020-07-26T00:43:18.000Z", "max_issues_repo_path": "src/toBaseline.js", "max_issues_repo_name": "nodef/extra-string", "max_issues_repo_issues_event_min_datetime": "2020-09-14T07:03:29.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T13:10:36.000Z", "max_forks_repo_path": "src/toBaseline.js", "max_forks_repo_name": "nodef/extra-string", "max_forks_repo_forks_event_min_datetime": "2020-07-26T00:43:22.000Z", "max_forks_repo_forks_event_max_datetime": "2020-07-26T00:43:22.000Z"}
{"max_stars_count": 3, "max_issues_count": 4, "max_forks_count": 1, "avg_line_length": 35.95, "max_line_length": 86, "alphanum_fraction": 0.6161335188}
const FSUP = '⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ᵝᵞᵟᶿᶥᵠᵡᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁⱽᵂᶦᶫᶰᶸᵃᵇᶜᵈᵉᶠᵍʰⁱʲᵏˡᵐⁿᵒᵖʳˢᵗᵘᵛʷˣʸᶻ';
const TSUP = '0123456789+-=()βγδθιφχABDEGHIJKLMNOPRTUVWILNUabcdefghijklmnoprstuvwxyz';
const FSUB = '₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₔᵦᵧᵨᵩᵪₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓ';
const TSUB = '0123456789+-=()əβγρφχaehijklmnoprstuvx';
function toBaseLine(str, sup, sub) {
  var s = 0, z = '';
  var sup = sup||[], sub = sub||[];
  var bgn = ['', sup[0]||'', sub[0]||''];
  var end = ['', sup[1]||'', sub[1]||''];
  for(var c of str) {
    var isup = FSUP.indexOf(c), isub = FSUB.indexOf(c);
    var sn = isup>=0? 1:(isub>=0? 2:0);
    if(sn!==s) z += end[s]+bgn[sn];
    z += TSUP[isup]||TSUB[isub]||c;
    s = sn;
  }
  return z+end[s];
};
module.exports = toBaseLine;
