Z16054

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z16054"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z16053",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z600",
            "Z16K2": "function Z16053( Z16053K1 ) {\n\t\n\tfunction generate(number, origin){\n\t\n\t     const TEN = 10;\n    const ONE_HUNDRED = 100;\n    const ONE_THOUSAND = 1000;\n    const ONE_MILLION = 1000000;\n    const ONE_BILLION = 1000000000;           //         1.000.000.000 (9)\n    const ONE_TRILLION = 1000000000000;       //     1.000.000.000.000 (12)\n    const ONE_QUADRILLION = 1000000000000000; // 1.000.000.000.000.000 (15)\n    const MAX = 9007199254740992;             // 9.007.199.254.740.992 (15)\n\n    const LESS_THAN_TWENTY =['efu','otu','abụọ','atọ','anọ','ise','isii','asaa','asatọ','itoolu','iri','iri na otu','iri na abụọ','iri na atọ','iri na anọ','iri na ise','iri na isii','iri na asaa','iri na asatọ','iri na itoolu']\n    const TENTHS_LESS_THAN_HUNDRED = [\n        'efu', 'iri', 'iri abụọ', ' iri atọ', 'iri anọ', 'iri ise', 'iri isii', 'iri asaa', 'iri asatọ', 'iri itoolu'\n    ];\n\n    let remainder, word,\n        words = arguments[2];\n\n    \n    \n    if (number === 0) {\n        return !words ? 'efu' : words.join(' ').replace(/,$/, *);\n    }\n    \n    if (!words) {\n        words = [];\n    }\n\n    if (number \u003C 20) {\n        remainder = 0;\n        word = origin \u003E  number ? `na ${LESS_THAN_TWENTY[number]}` : origin \u003E 100000 ? LESS_THAN_TWENTY[number]+'na'  : LESS_THAN_TWENTY[number] ;\n        \n\n    } else if (number \u003C ONE_HUNDRED) {\n        remainder = number % TEN;\n        word =  origin \u003E number ? `na ${TENTHS_LESS_THAN_HUNDRED[Math.floor(number / TEN)]}` : TENTHS_LESS_THAN_HUNDRED[Math.floor(number / TEN)] ;\n            \n            if (remainder) {\n                word += ' na ' + LESS_THAN_TWENTY[remainder] ;\n                remainder = 0;\n            }\n\n    } else if (number \u003C ONE_THOUSAND) {\n        remainder = number % ONE_HUNDRED;\n        if(number === 100)\n            word  = generate(Math.floor(number/ ONE_HUNDRED)) + ' narị';\n        else\n         word = origin \u003E number ?  `na narị ${generate(Math.floor(number/ ONE_HUNDRED))}` : `narị ${generate(Math.floor(number/ ONE_HUNDRED))} ${remainder \u003E 0  ? 'na' : *}`;\n        \n\n    }else if (number \u003C ONE_MILLION) {\n\n        remainder = number % ONE_THOUSAND;\n        if(number === 1000 || number === 100000)\n             word = origin \u003E number ? `na ${generate(Math.floor(number/ ONE_THOUSAND)) + ' puku'}` : generate(Math.floor(number/ ONE_THOUSAND)) + \" puku\"; \n        else     \n        word = origin \u003E number ?  `na puku ${generate(Math.floor(number/ ONE_THOUSAND))}` : `puku ${generate(Math.floor(number/ ONE_THOUSAND))}`;\n\n    } else if (number \u003C ONE_BILLION) {\n            \n        remainder = number % ONE_MILLION;\n        if(number === ONE_MILLION || number === 100000000)\n             word = origin \u003E number ? `na ${generate(Math.floor(number/ ONE_MILLION)) + ' nde'}` : generate(Math.floor(number/ ONE_MILLION)) + ' nde';\n        \n        else     \n             word = origin \u003E number ?  `na nde ${generate(Math.floor(number/ ONE_MILLION))}` : `nde ${generate(Math.floor(number/ ONE_MILLION))}`;\n\n\n    }else if (number \u003C ONE_TRILLION) {\n            \n        remainder = number % ONE_BILLION;\n        if(number === ONE_BILLION || number === 100000000000)\n             word = origin \u003E number ? `na ${generate(Math.floor(number/ ONE_BILLION)) + ' ijeri'}` : generate(Math.floor(number/ ONE_BILLION)) + ' ijeri';\n        \n        else     \n          word = origin \u003E number ?  `na ijeri ${generate(Math.floor(number/ ONE_BILLION))}` : `ijeri ${generate(Math.floor(number/ ONE_BILLION))}`;\n\n\n    }else if (number \u003C ONE_QUADRILLION) {\n            \n        remainder = number % ONE_TRILLION;\n        if(number === ONE_TRILLION || number ===100000000000000)\n             word = origin \u003E number ? `na ${generate(Math.floor(number/ ONE_TRILLION)) + ' tarị'}` : generate(Math.floor(number/ ONE_TRILLION)) + ' tarị';\n        else     \n            word = origin \u003E number ?  `na tarị ${generate(Math.floor(number/ ONE_TRILLION))} ` : `tarị ${generate(Math.floor(number/ ONE_TRILLION))}`;\n\n\n    }else if( number \u003E= ONE_QUADRILLION){\n\t    \tWikifunctions.Error(\"Z28307\",[String(number),String(ONE_QUADRILLION-1),\"ig\"]);\n\t    }\n\t    \n\t    \n\t    words.push(word);\n\t    return generate(remainder,origin, words);\n\n\t}\n\n\tlet words;\n    let num = Number(Z16053K1);\n    let originNum = num;\n    \n    words = generate(num,originNum);\n    \n    let number = \"\"+ words; // convert this string the tradational way.\n\n    let num_list = number.split(\" \"); // convert into a list for processing.\n\n    const num_list_size = num_list.length; // get the length of the  list.\n\n    let formatted_text = \"\";\n\n    for (let index = 0; index \u003C num_list.length; index++) {\n        \n        if(num_list[index] != \"\")\n        \tif(index == num_list.length-1)\n        \t\tformatted_text += num_list[index];\n            else\n            \tformatted_text += num_list[index] + \" \";\n\n        if(num_list[index] == num_list[index+1] \u0026\u0026 index+1 \u003C= num_list_size)\n            index = index+1;\n        \n    }\n\n    return formatted_text;\n\n}"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "igbo cardinal in javascript"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1014",
                "Z11K2": "kadinal igbo n'ime javascript"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1004",
                "Z11K2": "cardinal en igbo, en JavaScript"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1430",
                "Z11K2": "Igbo-Kardinalzahl in JavaScript"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11"
        ]
    }
}