getStrType = function (str) {
    let hasKJ = false;
    let hasHK = false;
    for (let i = 0; i < str.length; i++) {
        if (isKanji(str[i])) {
            hasKJ = true;
        }
        else if (isHiragana(str[i]) || isKatakana(str[i])) {
            hasHK = true;
        }
    }
    if (hasKJ && hasHK) return 1;
    if (hasKJ) return 0;
    if (hasHK) return 2;
    return 3;
}
Convert kana to romaji

@param {string} str Given string
@param {string} system To which romanization system the given string is converted. ["nippon"|"passport"|"hepburn"]
@return {string} Romaji string