From 2845cee5c9d38ad03015977c656d47f6f776595f Mon Sep 17 00:00:00 2001 From: Marwen Abdesslem Date: Fri, 4 Oct 2019 07:48:01 +0100 Subject: [PATCH] use Webpack instead of Grunt; add a standalone version without locales; closes #43 --- .gitignore | 3 + Gruntfile.js | 38 - dist/i18n/ar.json | 147 ++ dist/i18n/az.json | 52 + dist/i18n/en-indian.json | 42 + dist/i18n/en.json | 55 + dist/i18n/eo.json | 61 + dist/i18n/es.json | 142 ++ dist/i18n/fr.json | 133 ++ dist/i18n/hu.json | 124 ++ dist/i18n/id.json | 52 + dist/i18n/it.json | 123 ++ dist/i18n/pt-PT.json | 105 ++ dist/i18n/pt.json | 117 ++ dist/i18n/ru.json | 186 +++ dist/i18n/tr.json | 52 + dist/i18n/uk.json | 186 +++ dist/i18n/vi.json | 50 + dist/written-number.js | 2109 +++---------------------- dist/written-number.min.js | 2 +- dist/written-number.standalone.js | 136 ++ dist/written-number.standalone.min.js | 1 + lib/core.js | 215 +++ lib/index.js | 211 +-- lib/standalone.js | 37 + package.json | 17 +- test/standalone.test.js | 55 + webpack.config.js | 13 + webpack.config.standalone.js | 25 + 29 files changed, 2411 insertions(+), 2078 deletions(-) delete mode 100644 Gruntfile.js create mode 100644 dist/i18n/ar.json create mode 100644 dist/i18n/az.json create mode 100644 dist/i18n/en-indian.json create mode 100644 dist/i18n/en.json create mode 100644 dist/i18n/eo.json create mode 100644 dist/i18n/es.json create mode 100644 dist/i18n/fr.json create mode 100644 dist/i18n/hu.json create mode 100644 dist/i18n/id.json create mode 100644 dist/i18n/it.json create mode 100644 dist/i18n/pt-PT.json create mode 100644 dist/i18n/pt.json create mode 100644 dist/i18n/ru.json create mode 100644 dist/i18n/tr.json create mode 100644 dist/i18n/uk.json create mode 100644 dist/i18n/vi.json create mode 100644 dist/written-number.standalone.js create mode 100644 dist/written-number.standalone.min.js create mode 100644 lib/core.js create mode 100644 lib/standalone.js create mode 100644 test/standalone.test.js create mode 100644 webpack.config.js create mode 100644 webpack.config.standalone.js diff --git a/.gitignore b/.gitignore index 5a9069c..c5d0bd1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ # Created by https://www.gitignore.io +# Webstorm +.idea + ### Node ### # Logs logs diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 4c96ba5..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -module.exports = function (grunt) { - grunt.initConfig({ - clean: { - dist: [ - 'dist' - ] - }, - browserify: { - dist: { - files: { - 'dist/written-number.js': 'lib/index.js' - } - }, - options: { - browserifyOptions: {'standalone': 'writtenNumber'} - } - }, - uglify: { - dist: { - files: { - 'dist/written-number.min.js': 'dist/written-number.js' - } - } - } - }); - - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-browserify'); - - grunt.registerTask('dist', [ - 'clean:dist', - 'browserify:dist', - 'uglify:dist' - ]); -}; diff --git a/dist/i18n/ar.json b/dist/i18n/ar.json new file mode 100644 index 0000000..5495aa3 --- /dev/null +++ b/dist/i18n/ar.json @@ -0,0 +1,147 @@ +{ + "useLongScale": false, + "baseSeparator": "", + "unitSeparator": "", + "allSeparator": "و", + "base": { + "0": "صفر", + "1": "واحد", + "2": "اثنان", + "3": "ثلاثة", + "4": "أربعة", + "5": "خمسة", + "6": "ستة", + "7": "سبعة", + "8": "ثمانية", + "9": "تسعة", + + "10": "عشرة", + "11": "أحد عشر", + "12": "إثنا عشر", + "13": "ثلاثة عشر", + "14": "أربعة عشر", + "15": "خمسة عشر", + "16": "ستة عشر", + "17": "سبعة عشر", + "18": "ثمانية عشر", + "19": "تسعة عشر", + + "20": "عشرون", + "21": "واحد وعشرون", + "22": "اثنان وعشرون", + "23": "ثلاثة وعشرون", + "24": "أربعة وعشرون", + "25": "خمسة وعشرون", + "26": "ستة وعشرون", + "27": "سبعة وعشرون", + "28": "ثمانية وعشرون", + "29": "تسعة وعشرون", + + "30": "ثلاثون", + "31": "واحد وثلاثون", + "32": "اثنان وثلاثون", + "33": "ثلاثة وثلاثون", + "34": "أربعة وثلاثون", + "35": "خمسة وثلاثون", + "36": "ستة وثلاثون", + "37": "سبعة وثلاثون", + "38": "ثمانية وثلاثون", + "39": "تسعة وثلاثون", + + "40": "أربعون", + "41": "واحد وأربعون", + "42": "اثنان وأربعون", + "43": "ثلاثة وأربعون", + "44": "أربعة وأربعون", + "45": "خمسة وأربعون", + "46": "ستة وأربعون", + "47": "سبعة وأربعون", + "48": "ثمانية وأربعون", + "49": "تسعة وأربعون", + + "50": "خمسون", + "51": "واحد وخمسون", + "52": "اثنان وخمسون", + "53": "ثلاثة وخمسون", + "54": "أربعة وخمسون", + "55": "خمسة وخمسون", + "56": "ستة وخمسون", + "57": "سبعة وخمسون", + "58": "ثمانية وخمسون", + "59": "تسعة وخمسون", + + "60": "ستون", + "61": "واحد وستون", + "62": "اثنان وستون", + "63": "ثلاثة وستون", + "64": "أربعة وستون", + "65": "خمسة وستون", + "66": "ستة وستون", + "67": "سبعة وستون", + "68": "ثمانية وستون", + "69": "تسعة وستون", + + "70": "سبعون", + "71": "واحد وسبعون", + "72": "اثنان وسبعون", + "73": "ثلاثة وسبعون", + "74": "أربعة وسبعون", + "75": "خمسة وسبعون", + "76": "ستة وسبعون", + "77": "سبعة وسبعون", + "78": "ثمانية وسبعون", + "79": "تسعة وسبعون", + + "80": "ثمانون", + "81": "واحد وثمانون", + "82": "اثنان وثمانون", + "83": "ثلاثة وثمانون", + "84": "أربعة وثمانون", + "85": "خمسة وثمانون", + "86": "ستة وثمانون", + "87": "سبعة وثمانون", + "88": "ثمانية وثمانون", + "89": "تسعة وثمانون", + + "90": "تسعون", + "91": "واحد وتسعون", + "92": "اثنان وتسعون", + "93": "ثلاثة وتسعون", + "94": "أربعة وتسعون", + "95": "خمسة وتسعون", + "96": "ستة وتسعون", + "97": "سبعة وتسعون", + "98": "ثمانية وتسعون", + "99": "تسعة وتسعون", + + "200": "مائتان", + "300": "ثلاثمائة", + "400": "أربعمائة", + "500": "خمسمائة", + "600": "ستمائة", + "700": "سبعمائة", + "800": "ثمانمائة", + "900": "تسعمائة" + }, + "units" : [ + {"singular":"مائة", "useBaseInstead": true, "useBaseException": [1]}, + {"singular":"ألف", "dual":"ألفان", "plural":"آلاف", "restrictedPlural": true, "avoidPrefixException": [1, 2]}, + {"singular":"مليون", "dual":"مليونان", "plural":"ملايين", "restrictedPlural": true, "avoidPrefixException": [1, 2]}, + {"singular":"مليار", "dual":"ملياران", "plural":"ملايير", "restrictedPlural": true, "avoidPrefixException": [1, 2]}, + + {"singular":"تريليون", "avoidPrefixException": [1]}, + {"singular":"كوادريليون", "avoidPrefixException": [1]}, + {"singular":"كوينتليون", "avoidPrefixException": [1]}, + {"singular":"سكستليون", "avoidPrefixException": [1]}, + {"singular":"سبتيلليون", "avoidPrefixException": [1]}, + {"singular":"أوكتيليون", "avoidPrefixException": [1]}, + {"singular":"نونيلليون", "avoidPrefixException": [1]}, + {"singular":"دشيليون", "avoidPrefixException": [1]}, + {"singular":"أوندشيلليون", "avoidPrefixException": [1]}, + {"singular":"دودشيليون", "avoidPrefixException": [1]}, + {"singular":"تريدشيليون", "avoidPrefixException": [1]}, + {"singular":"كواتوردشيليون", "avoidPrefixException": [1]}, + {"singular":"كويندشيليون" , "avoidPrefixException": [1]} + ], + "unitExceptions": {} +} \ No newline at end of file diff --git a/dist/i18n/az.json b/dist/i18n/az.json new file mode 100644 index 0000000..9247b0a --- /dev/null +++ b/dist/i18n/az.json @@ -0,0 +1,52 @@ +{ + "useLongScale": false, + "baseSeparator": " ", + "unitSeparator": "", + "base": { + "0": "sıfır", + "1": "bir", + "2": "iki", + "3": "üç", + "4": "dörd", + "5": "beş", + "6": "altı", + "7": "yeddi", + "8": "səkkiz", + "9": "doqquz", + "10": "on", + "20": "iyirmi", + "30": "otuz", + "40": "qırx", + "50": "əlli", + "60": "altmış", + "70": "yetmiş", + "80": "səksən", + "90": "doxsan" + }, + "units" : [ + { + "singular": "yüz", + "avoidPrefixException": [1] + }, + { + "singular": "min", + "avoidPrefixException": [1] + }, + "milyon", + "milyard", + "trilyon", + "kvadrilyon", + "kentilyon", + "sekstilyon", + "septilyon", + "oktilyon", + "nonilyon", + "desilyon", + "andesilyon", + "dodesilyon", + "tredesilyon", + "katordesilyon", + "kendesilyon" + ], + "unitExceptions": [] + } \ No newline at end of file diff --git a/dist/i18n/en-indian.json b/dist/i18n/en-indian.json new file mode 100644 index 0000000..841abad --- /dev/null +++ b/dist/i18n/en-indian.json @@ -0,0 +1,42 @@ +{ + "useLongScale": false, + "baseSeparator": "-", + "unitSeparator": "and ", + "base": { + "0": "zero", + "1": "one", + "2": "two", + "3": "three", + "4": "four", + "5": "five", + "6": "six", + "7": "seven", + "8": "eight", + "9": "nine", + "10": "ten", + "11": "eleven", + "12": "twelve", + "13": "thirteen", + "14": "fourteen", + "15": "fifteen", + "16": "sixteen", + "17": "seventeen", + "18": "eighteen", + "19": "nineteen", + "20": "twenty", + "30": "thirty", + "40": "forty", + "50": "fifty", + "60": "sixty", + "70": "seventy", + "80": "eighty", + "90": "ninety" + }, + "units" : { + "2": "hundred", + "3": "thousand", + "5": "lakh", + "7": "crore" + }, + "unitExceptions": [] +} \ No newline at end of file diff --git a/dist/i18n/en.json b/dist/i18n/en.json new file mode 100644 index 0000000..810011f --- /dev/null +++ b/dist/i18n/en.json @@ -0,0 +1,55 @@ +{ + "useLongScale": false, + "baseSeparator": "-", + "unitSeparator": "and ", + "base": { + "0": "zero", + "1": "one", + "2": "two", + "3": "three", + "4": "four", + "5": "five", + "6": "six", + "7": "seven", + "8": "eight", + "9": "nine", + "10": "ten", + "11": "eleven", + "12": "twelve", + "13": "thirteen", + "14": "fourteen", + "15": "fifteen", + "16": "sixteen", + "17": "seventeen", + "18": "eighteen", + "19": "nineteen", + "20": "twenty", + "30": "thirty", + "40": "forty", + "50": "fifty", + "60": "sixty", + "70": "seventy", + "80": "eighty", + "90": "ninety" + }, + "units" : [ + "hundred", + "thousand", + "million", + "billion", + "trillion", + "quadrillion", + "quintillion", + "sextillion", + "septillion", + "octillion", + "nonillion", + "decillion", + "undecillion", + "duodecillion", + "tredecillion", + "quattuordecillion", + "quindecillion" + ], + "unitExceptions": [] +} \ No newline at end of file diff --git a/dist/i18n/eo.json b/dist/i18n/eo.json new file mode 100644 index 0000000..40b5083 --- /dev/null +++ b/dist/i18n/eo.json @@ -0,0 +1,61 @@ +{ + "useLongScale": false, + "baseSeparator": " ", + "unitSeparator": "", + "base": { + "0": "nulo", + "1": "unu", + "2": "du", + "3": "tri", + "4": "kvar", + "5": "kvin", + "6": "ses", + "7": "sep", + "8": "ok", + "9": "naŭ", + "10": "dek", + "20": "dudek", + "30": "tridek", + "40": "kvardek", + "50": "kvindek", + "60": "sesdek", + "70": "sepdek", + "80": "okdek", + "90": "naŭdek", + "100": "cent", + "200": "ducent", + "300": "tricent", + "400": "kvarcent", + "500": "kvincent", + "600": "sescent", + "700": "sepcent", + "800": "okcent", + "900": "naŭcent" + }, + "units" : [ + { + "useBaseInstead": true, + "useBaseException": [] + }, + { + "singular": "mil", + "avoidPrefixException": [1] + }, + { + "singular": "miliono", + "plural": "milionoj", + "avoidPrefixException": [1] + }, + { + "singular": "miliardo", + "plural": "miliardoj", + "avoidPrefixException": [1] + }, + { + "singular": "biliono", + "plural": "bilionoj", + "avoidPrefixException": [1] + } + ], + "unitExceptions": [] +} diff --git a/dist/i18n/es.json b/dist/i18n/es.json new file mode 100644 index 0000000..53fe05f --- /dev/null +++ b/dist/i18n/es.json @@ -0,0 +1,142 @@ +{ + "useLongScale": true, + "baseSeparator": " y ", + "unitSeparator": "", + "base": { + "0": "cero", + "1": "uno", + "2": "dos", + "3": "tres", + "4": "cuatro", + "5": "cinco", + "6": "seis", + "7": "siete", + "8": "ocho", + "9": "nueve", + "10": "diez", + "11": "once", + "12": "doce", + "13": "trece", + "14": "catorce", + "15": "quince", + "16": "dieciséis", + "17": "diecisiete", + "18": "dieciocho", + "19": "diecinueve", + "20": "veinte", + "21": "veintiuno", + "22": "veintidós", + "23": "veintitrés", + "24": "veinticuatro", + "25": "veinticinco", + "26": "veintiséis", + "27": "veintisiete", + "28": "veintiocho", + "29": "veintinueve", + "30": "treinta", + "40": "cuarenta", + "50": "cincuenta", + "60": "sesenta", + "70": "setenta", + "80": "ochenta", + "90": "noventa", + "100": "cien", + "200": "doscientos", + "300": "trescientos", + "400": "cuatrocientos", + "500": "quinientos", + "600": "seiscientos", + "700": "setecientos", + "800": "ochocientos", + "900": "novecientos", + "1000": "mil" + }, + "unitExceptions": { + "1000000": "un millón", + "1000000000000": "un billón", + "1000000000000000000": "un trillón", + "1000000000000000000000000": "un cuatrillones", + "1000000000000000000000000000000": "un quintillón", + "1000000000000000000000000000000000000": "un sextillón", + "1000000000000000000000000000000000000000000": "un septillón", + "1000000000000000000000000000000000000000000000000": "un octillón", + "1000000000000000000000000000000000000000000000000000000": "un nonillón", + "1000000000000000000000000000000000000000000000000000000000000": "un decillón", + "1000000000000000000000000000000000000000000000000000000000000000000": "un undecillón", + "1000000000000000000000000000000000000000000000000000000000000000000000000": "un duodecillón", + "1000000000000000000000000000000000000000000000000000000000000000000000000000000": "un tredecillón", + "1000000000000000000000000000000000000000000000000000000000000000000000000000000000000": "un cuatordecillón", + "1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": "un quindecillón" + }, + "units" : [ + { + "singular": "ciento", + "useBaseInstead": true, + "useBaseException": [1] + }, + { + "singular": "mil", + "avoidPrefixException": [1] + }, + { + "singular": "millón", + "plural": "millones" + }, + { + "singular": "billón", + "plural": "billones" + }, + { + "singular": "trillón", + "plural": "trillones" + }, + { + "singular": "cuatrillón", + "plural": "cuatrillones" + }, + { + "singular": "quintillón", + "plural": "quintillones" + }, + { + "singular": "sextillón", + "plural": "sextillones" + }, + { + "singular": "septillón", + "plural": "septillones" + }, + { + "singular": "octillón", + "plural": "octillones" + }, + { + "singular": "nonillón", + "plural": "nonillones" + }, + { + "singular": "decillón", + "plural": "decillones" + }, + { + "singular": "undecillón", + "plural": "undecillones" + }, + { + "singular": "duodecillón", + "plural": "duodecillones" + }, + { + "singular": "tredecillón", + "plural": "tredecillones" + }, + { + "singular": "cuatrodecillón", + "plural": "cuatrodecillones" + }, + { + "singular": "quindecillón", + "plural": "quindecillones" + } + ] +} diff --git a/dist/i18n/fr.json b/dist/i18n/fr.json new file mode 100644 index 0000000..936d79e --- /dev/null +++ b/dist/i18n/fr.json @@ -0,0 +1,133 @@ +{ + "useLongScale": false, + "baseSeparator": "-", + "unitSeparator": "", + "base": { + "0": "zéro", + "1": "un", + "2": "deux", + "3": "trois", + "4": "quatre", + "5": "cinq", + "6": "six", + "7": "sept", + "8": "huit", + "9": "neuf", + "10": "dix", + "11": "onze", + "12": "douze", + "13": "treize", + "14": "quatorze", + "15": "quinze", + "16": "seize", + "17": "dix-sept", + "18": "dix-huit", + "19": "dix-neuf", + "20": "vingt", + "30": "trente", + "40": "quarante", + "50": "cinquante", + "60": "soixante", + "70": "soixante-dix", + "80": "quatre-vingt", + "90": "quatre-vingt-dix" + }, + "units" : [ + { + "singular": "cent", + "plural": "cents", + "avoidInNumberPlural": true, + "avoidPrefixException": [1] + }, + { + "singular": "mille", + "avoidPrefixException": [1] + }, + { + "singular": "million", + "plural": "millions" + }, + { + "singular": "milliard", + "plural": "milliards" + }, + { + "singular": "billion", + "plural": "billions" + }, + { + "singular": "billiard", + "plural": "billiards" + }, + { + "singular": "trillion", + "plural": "trillions" + }, + { + "singular": "trilliard", + "plural": "trilliards" + }, + { + "singular": "quadrillion", + "plural": "quadrillions" + }, + { + "singular": "quadrilliard", + "plural": "quadrilliards" + }, + { + "singular": "quintillion", + "plural": "quintillions" + }, + { + "singular": "quintilliard", + "plural": "quintilliards" + }, + { + "singular": "sextillion", + "plural": "sextillions" + }, + { + "singular": "sextilliard", + "plural": "sextilliards" + }, + { + "singular": "septillion", + "plural": "septillions" + }, + { + "singular": "septilliard", + "plural": "septilliards" + }, + { + "singular": "octillion", + "plural": "octillions" + } + ], + "unitExceptions": { + "21": "vingt et un", + "31": "trente et un", + "41": "quarante et un", + "51": "cinquante et un", + "61": "soixante et un", + "71": "soixante et onze", + "72": "soixante-douze", + "73": "soixante-treize", + "74": "soixante-quatorze", + "75": "soixante-quinze", + "76": "soixante-seize", + "77": "soixante-dix-sept", + "78": "soixante-dix-huit", + "79": "soixante-dix-neuf", + "80": "quatre-vingts", + "91": "quatre-vingt-onze", + "92": "quatre-vingt-douze", + "93": "quatre-vingt-treize", + "94": "quatre-vingt-quatorze", + "95": "quatre-vingt-quinze", + "96": "quatre-vingt-seize", + "97": "quatre-vingt-dix-sept", + "98": "quatre-vingt-dix-huit", + "99": "quatre-vingt-dix-neuf" + } +} diff --git a/dist/i18n/hu.json b/dist/i18n/hu.json new file mode 100644 index 0000000..b85e9bf --- /dev/null +++ b/dist/i18n/hu.json @@ -0,0 +1,124 @@ +{ + "useLongScale": true, + "baseSeparator": "", + "unitSeparator": "és ", + "base": { + "0": "nulla", + "1": "egy", + "2": "kettő", + "3": "három", + "4": "négy", + "5": "öt", + "6": "hat", + "7": "hét", + "8": "nyolc", + "9": "kilenc", + "10": "tíz", + "11": "tizenegy", + "12": "tizenkettő", + "13": "tizenhárom", + "14": "tizennégy", + "15": "tizenöt", + "16": "tizenhat", + "17": "tizenhét", + "18": "tizennyolc", + "19": "tizenkilenc", + "20": "húsz", + "21": "huszonegy", + "22": "huszonkettő", + "23": "huszonhárom", + "24": "huszonnégy", + "25": "huszonöt", + "26": "huszonhat", + "27": "huszonhét", + "28": "huszonnyolc", + "29": "huszonkilenc", + "30": "harminc", + "40": "negyven", + "50": "ötven", + "60": "hatvan", + "70": "hetven", + "80": "nyolcvan", + "90": "kilencven", + "100": "száz", + "200": "kétszáz", + "300": "háromszáz", + "400": "négyszáz", + "500": "ötszáz", + "600": "hatszáz", + "700": "hétszáz", + "800": "nyolcszáz", + "900": "kilencszáz", + "1000": "ezer" + }, + "unitExceptions": { + "1": "egy" + }, + "units" : [ + { + "singular": "száz", + "useBaseInstead": true, + "useBaseException": [1] + }, + { + "singular": "ezer", + "avoidPrefixException": [1] + }, + { + "singular": "millió", + "avoidPrefixException": [1] + }, + { + "singular": "milliárd", + "avoidPrefixException": [1] + }, + { + "singular": "-billió", + "avoidPrefixException": [1] + }, + { + "singular": "billiárd", + "avoidPrefixException": [1] + }, + { + "singular": "trillió", + "avoidPrefixException": [1] + }, + { + "singular": "trilliárd", + "avoidPrefixException": [1] + }, + { + "singular": "kvadrillió", + "avoidPrefixException": [1] + }, + { + "singular": "kvadrilliárd", + "avoidPrefixException": [1] + }, + { + "singular": "kvintillió", + "avoidPrefixException": [1] + }, + { + "singular": "kvintilliárd", + "avoidPrefixException": [1] + }, + { + "singular": "szextillió", + "avoidPrefixException": [1] + }, + { + "singular": "szeptillió", + "avoidPrefixException": [1] + }, + { + "singular": "oktillió", + "avoidPrefixException": [1] + }, + { + "singular": "nonillió", + "avoidPrefixException": [1] + } + ] +} diff --git a/dist/i18n/id.json b/dist/i18n/id.json new file mode 100644 index 0000000..a34ab0a --- /dev/null +++ b/dist/i18n/id.json @@ -0,0 +1,52 @@ +{ + "useLongScale": false, + "baseSeparator": " ", + "unitSeparator": "", + "base": { + "0": "nol", + "1": "satu", + "2": "dua", + "3": "tiga", + "4": "empat", + "5": "lima", + "6": "enam", + "7": "tujuh", + "8": "delapan", + "9": "sembilan", + "10": "sepuluh", + "11": "sebelas", + "12": "dua belas", + "13": "tiga belas", + "14": "empat belas", + "15": "lima belas", + "16": "enam belas", + "17": "tujuh belas", + "18": "delapan belas", + "19": "sembilan belas", + "20": "dua puluh", + "30": "tiga puluh", + "40": "empat puluh", + "50": "lima puluh", + "60": "enam puluh", + "70": "tujuh puluh", + "80": "delapan puluh", + "90": "sembilan puluh" + }, + "units" : [ + { + "singular": "seratus", + "plural": "ratus", + "avoidPrefixException": [1] + }, + { + "singular": "seribu", + "plural": "ribu", + "avoidPrefixException": [1] + }, + "juta", + "miliar", + "triliun", + "kuadiliun" + ], + "unitExceptions": [] +} diff --git a/dist/i18n/it.json b/dist/i18n/it.json new file mode 100644 index 0000000..cf10bc2 --- /dev/null +++ b/dist/i18n/it.json @@ -0,0 +1,123 @@ +{ + "useLongScale": false, + "baseSeparator": "", + "unitSeparator": "", + "generalSeparator": "", + "wordSeparator": "", + "base": { + "0": "zero", + "1": "uno", + "2": "due", + "3": "tre", + "4": "quattro", + "5": "cinque", + "6": "sei", + "7": "sette", + "8": "otto", + "9": "nove", + "10": "dieci", + "11": "undici", + "12": "dodici", + "13": "tredici", + "14": "quattordici", + "15": "quindici", + "16": "sedici", + "17": "diciassette", + "18": "diciotto", + "19": "diciannove", + "20": "venti", + "21": "ventuno", + "23": "ventitré", + "28": "ventotto", + "30": "trenta", + "31": "trentuno", + "33": "trentatré", + "38": "trentotto", + "40": "quaranta", + "41": "quarantuno", + "43": "quaranta­tré", + "48": "quarantotto", + "50": "cinquanta", + "51": "cinquantuno", + "53": "cinquantatré", + "58": "cinquantotto", + "60": "sessanta", + "61": "sessantuno", + "63": "sessanta­tré", + "68": "sessantotto", + "70": "settanta", + "71": "settantuno", + "73": "settantatré", + "78": "settantotto", + "80": "ottanta", + "81": "ottantuno", + "83": "ottantatré", + "88": "ottantotto", + "90": "novanta", + "91": "novantuno", + "93": "novantatré", + "98": "novantotto", + "100": "cento", + "101": "centuno", + "108": "centootto", + "180": "centottanta", + "201": "duecentuno", + "301": "tre­cent­uno", + "401": "quattro­cent­uno", + "501": "cinque­cent­uno", + "601": "sei­cent­uno", + "701": "sette­cent­uno", + "801": "otto­cent­uno", + "901": "nove­cent­uno" + }, + "unitExceptions": { + "1": "un" + }, + "units": [ + { + "singular": "cento", + "avoidPrefixException": [ + 1 + ] + }, + { + "singular": "mille", + "plural": "mila", + "avoidPrefixException": [ + 1 + ] + }, + { + "singular": "milione", + "plural": "milioni" + }, + { + "singular": "miliardo", + "plural": "miliardi" + }, + { + "singular": "bilione", + "plural": "bilioni" + }, + { + "singular": "biliardo", + "plural": "biliardi" + }, + { + "singular": "trilione", + "plural": "trilioni" + }, + { + "singular": "triliardo", + "plural": "triliardi" + }, + { + "singular": "quadrilione", + "plural": "quadrilioni" + }, + { + "singular": "quadriliardo", + "plural": "quadriliardi" + } + ] +} diff --git a/dist/i18n/pt-PT.json b/dist/i18n/pt-PT.json new file mode 100644 index 0000000..11640f2 --- /dev/null +++ b/dist/i18n/pt-PT.json @@ -0,0 +1,105 @@ +{ + "useLongScale": true, + "baseSeparator": " e ", + "unitSeparator": "e ", + "andWhenTrailing": true, + "base": { + "0": "zero", + "1": "um", + "2": "dois", + "3": "três", + "4": "quatro", + "5": "cinco", + "6": "seis", + "7": "sete", + "8": "oito", + "9": "nove", + "10": "dez", + "11": "onze", + "12": "doze", + "13": "treze", + "14": "catorze", + "15": "quinze", + "16": "dezasseis", + "17": "dezassete", + "18": "dezoito", + "19": "dezanove", + "20": "vinte", + "30": "trinta", + "40": "quarenta", + "50": "cinquenta", + "60": "sessenta", + "70": "setenta", + "80": "oitenta", + "90": "noventa", + "100": "cem", + "200": "duzentos", + "300": "trezentos", + "400": "quatrocentos", + "500": "quinhentos", + "600": "seiscentos", + "700": "setecentos", + "800": "oitocentos", + "900": "novecentos", + "1000": "mil" + }, + "unitExceptions": { + "1": "um" + }, + "units" : [ + { + "singular": "cento", + "useBaseInstead": true, + "useBaseException": [ + 1 + ], + "useBaseExceptionWhenNoTrailingNumbers": true, + "andException": true + }, + { + "singular": "mil", + "avoidPrefixException": [1], + "andException": true + }, + { + "singular": "milhão", + "plural": "milhões" + }, + { + "singular": "bilião", + "plural": "biliões" + }, + { + "singular": "trilião", + "plural": "triliões" + }, + { + "singular": "quadrilião", + "plural": "quadriliões" + }, + { + "singular": "quintilião", + "plural": "quintiliões" + }, + { + "singular": "sextilião", + "plural": "sextiliões" + }, + { + "singular": "septilião", + "plural": "septiliões" + }, + { + "singular": "octilião", + "plural": "octiliões" + }, + { + "singular": "nonilião", + "plural": "noniliões" + }, + { + "singular": "decilião", + "plural": "deciliões" + } + ] +} diff --git a/dist/i18n/pt.json b/dist/i18n/pt.json new file mode 100644 index 0000000..8babd98 --- /dev/null +++ b/dist/i18n/pt.json @@ -0,0 +1,117 @@ +{ + "useLongScale": false, + "baseSeparator": " e ", + "unitSeparator": "e ", + "andWhenTrailing": true, + "base": { + "0": "zero", + "1": "um", + "2": "dois", + "3": "três", + "4": "quatro", + "5": "cinco", + "6": "seis", + "7": "sete", + "8": "oito", + "9": "nove", + "10": "dez", + "11": "onze", + "12": "doze", + "13": "treze", + "14": "catorze", + "15": "quinze", + "16": "dezesseis", + "17": "dezessete", + "18": "dezoito", + "19": "dezenove", + "20": "vinte", + "30": "trinta", + "40": "quarenta", + "50": "cinquenta", + "60": "sessenta", + "70": "setenta", + "80": "oitenta", + "90": "noventa", + "100": "cem", + "200": "duzentos", + "300": "trezentos", + "400": "quatrocentos", + "500": "quinhentos", + "600": "seiscentos", + "700": "setecentos", + "800": "oitocentos", + "900": "novecentos", + "1000": "mil" + }, + "unitExceptions": { + "1": "um" + }, + "units" : [ + { + "singular": "cento", + "useBaseInstead": true, + "useBaseException": [ + 1 + ], + "useBaseExceptionWhenNoTrailingNumbers": true, + "andException": true + }, + { + "singular": "mil", + "avoidPrefixException": [1], + "andException": true + }, + { + "singular": "milhão", + "plural": "milhões" + }, + { + "singular": "bilhão", + "plural": "bilhões" + }, + { + "singular": "trilhão", + "plural": "trilhões" + }, + { + "singular": "quadrilhão", + "plural": "quadrilhão" + }, + { + "singular": "quintilhão", + "plural": "quintilhões" + }, + { + "singular": "sextilhão", + "plural": "sextilhões" + }, + { + "singular": "septilhão", + "plural": "septilhões" + }, + { + "singular": "octilhão", + "plural": "octilhões" + }, + { + "singular": "nonilhão", + "plural": "nonilhões" + }, + { + "singular": "decilhão", + "plural": "decilhões" + }, + { + "singular": "undecilhão", + "plural": "undecilhões" + }, + { + "singular": "doudecilhão", + "plural": "doudecilhões" + }, + { + "singular": "tredecilhão", + "plural": "tredecilhões" + } + ] +} diff --git a/dist/i18n/ru.json b/dist/i18n/ru.json new file mode 100644 index 0000000..cb16390 --- /dev/null +++ b/dist/i18n/ru.json @@ -0,0 +1,186 @@ +{ + "useLongScale": false, + "baseSeparator": " ", + "unitSeparator": "", + "base": { + "0": "ноль", + "1": "один", + "2": "два", + "3": "три", + "4": "четыре", + "5": "пять", + "6": "шесть", + "7": "семь", + "8": "восемь", + "9": "девять", + "10": "десять", + "11": "одинадцать", + "12": "двенадцать", + "13": "тринадцать", + "14": "четырнадцать", + "15": "пятнадцать", + "16": "шестнадцать", + "17": "семнадцать", + "18": "восемнадцать", + "19": "девятнадцать", + "20": "двадцать", + "30": "тридцать", + "40": "сорок", + "50": "пятьдесят", + "60": "шестьдесят", + "70": "семьдесят", + "80": "восемьдесят", + "90": "девяносто", + "100": "сто", + "200": "двести", + "300": "триста", + "400": "четыреста", + "500": "пятьсот", + "600": "шестьсот", + "700": "семьсот", + "800": "восемьсот", + "900": "девятьсот" + }, + "alternativeBase": { + "feminine": { + "1": "одна", + "2": "две" + } + }, + "units": [ + { + "useBaseInstead": true, + "useBaseException": [] + }, + { + "singular": "тысяча", + "few": "тысячи", + "plural": "тысяч", + "useAlternativeBase": "feminine", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "миллион", + "few": "миллиона", + "plural": "миллионов", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "миллиард", + "few": "миллиарда", + "plural": "миллиардов", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "триллион", + "few": "триллиона", + "plural": "триллионов", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "квадрильон", + "few": "квадриллион", + "plural": "квадрилон", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "квинтиллион", + "few": "квинтиллиона", + "plural": "квинтильонов", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "секстиллионов", + "few": "секстильона", + "plural": "секстиллионов", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "септиллион", + "few": "септиллиона", + "plural": "септиллионов", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "октиллион", + "few": "октиллиона", + "plural": "октиллионов", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "нониллион", + "few": "нониллиона", + "plural": "нониллионов", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "дециллион", + "few": "дециллиона", + "plural": "дециллионов", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "ундециллион", + "few": "ундециллиона", + "plural": "ундециллионив", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "дуодециллион", + "few": "дуодециллиона", + "plural": "дуодециллионив", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "тредециллион", + "few": "тредециллиона", + "plural": "тредециллионив", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "кватуордециллион", + "few": "кватуордециллиона", + "plural": "кватуордециллионив", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "квиндециллион", + "few": "квиндециллиона", + "plural": "квиндециллионив", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + } + ], + "unitExceptions": [] +} \ No newline at end of file diff --git a/dist/i18n/tr.json b/dist/i18n/tr.json new file mode 100644 index 0000000..1605789 --- /dev/null +++ b/dist/i18n/tr.json @@ -0,0 +1,52 @@ +{ + "useLongScale": false, + "baseSeparator": " ", + "unitSeparator": "", + "base": { + "0": "sıfır", + "1": "bir", + "2": "iki", + "3": "üç", + "4": "dört", + "5": "beş", + "6": "altı", + "7": "yedi", + "8": "sekiz", + "9": "dokuz", + "10": "on", + "20": "yirmi", + "30": "otuz", + "40": "kırk", + "50": "elli", + "60": "altmış", + "70": "yetmiş", + "80": "seksen", + "90": "doksan" + }, + "units" : [ + { + "singular": "yüz", + "avoidPrefixException": [1] + }, + { + "singular": "bin", + "avoidPrefixException": [1] + }, + "milyon", + "milyar", + "trilyon", + "katrilyon", + "kentilyon", + "sekstilyon", + "septilyon", + "oktilyon", + "nonilyon", + "desilyon", + "andesilyon", + "dodesilyon", + "tredesilyon", + "katordesilyon", + "kendesilyon" + ], + "unitExceptions": [] +} \ No newline at end of file diff --git a/dist/i18n/uk.json b/dist/i18n/uk.json new file mode 100644 index 0000000..8557dcc --- /dev/null +++ b/dist/i18n/uk.json @@ -0,0 +1,186 @@ +{ + "useLongScale": false, + "baseSeparator": " ", + "unitSeparator": "", + "base": { + "0": "нуль", + "1": "один", + "2": "два", + "3": "три", + "4": "чотири", + "5": "п’ять", + "6": "шість", + "7": "сім", + "8": "вісім", + "9": "дев’ять", + "10": "десять", + "11": "одинадцять", + "12": "дванадцять", + "13": "тринадцять", + "14": "чотирнадцять", + "15": "п’ятнадцять", + "16": "шістнадцять", + "17": "сімнадцять", + "18": "вісімнадцять", + "19": "дев’ятнадцять", + "20": "двадцять", + "30": "тридцять", + "40": "сорок", + "50": "п’ятдесят", + "60": "шістдесят", + "70": "сімдесят", + "80": "вісімдесят", + "90": "дев’яносто", + "100": "сто", + "200": "двісті", + "300": "триста", + "400": "чотириста", + "500": "п’ятсот", + "600": "шістсот", + "700": "сімсот", + "800": "вісімсот", + "900": "дев’ятсот" + }, + "alternativeBase": { + "feminine": { + "1": "одна", + "2": "дві" + } + }, + "units" : [ + { + "useBaseInstead": true, + "useBaseException": [] + }, + { + "singular": "тисяча", + "few": "тисячі", + "plural": "тисяч", + "useAlternativeBase": "feminine", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "мільйон", + "few": "мільйони", + "plural": "мільйонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "мільярд", + "few": "мільярди", + "plural": "мільярдів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "трильйон", + "few": "трильйони", + "plural": "трильйонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "квадрильйон", + "few": "квадрильйони", + "plural": "квадрильйонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "квінтильйон", + "few": "квінтильйони", + "plural": "квінтильйонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "секстильйон", + "few": "секстильйони", + "plural": "секстильйонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "септілліон", + "few": "септілліони", + "plural": "септілліонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "октілліон", + "few": "октілліони", + "plural": "октілліонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "нонілліон", + "few": "нонілліони", + "plural": "нонілліонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "децілліон", + "few": "децілліони", + "plural": "децілліонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "ундецілліон", + "few": "ундецілліони", + "plural": "ундецілліонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "дуодецілліон", + "few": "дуодецілліони", + "plural": "дуодецілліонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "тредецілліон", + "few": "тредецілліони", + "plural": "тредецілліонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "кватуордецілліон", + "few": "кватуордецілліони", + "plural": "кватуордецілліонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + }, + { + "singular": "квіндецілліон", + "few": "квіндецілліони", + "plural": "квіндецілліонів", + "useSingularEnding": true, + "useFewEnding": true, + "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] + } + ], + "unitExceptions": [] +} diff --git a/dist/i18n/vi.json b/dist/i18n/vi.json new file mode 100644 index 0000000..ea74315 --- /dev/null +++ b/dist/i18n/vi.json @@ -0,0 +1,50 @@ +{ + "useLongScale": false, + "baseSeparator": " ", + "unitSeparator": "và ", + "base": { + "0": "không", + "1": "một", + "2": "hai", + "3": "ba", + "4": "bốn", + "5": "năm", + "6": "sáu", + "7": "bảy", + "8": "tám", + "9": "chín", + "10": "mười", + "15": "mười lăm", + "20": "hai mươi", + "21": "hai mươi mốt", + "25": "hai mươi lăm", + "30": "ba mươi", + "31": "ba mươi mốt", + "40": "bốn mươi", + "41": "bốn mươi mốt", + "45": "bốn mươi lăm", + "50": "năm mươi", + "51": "năm mươi mốt", + "55": "năm mươi lăm", + "60": "sáu mươi", + "61": "sáu mươi mốt", + "65": "sáu mươi lăm", + "70": "bảy mươi", + "71": "bảy mươi mốt", + "75": "bảy mươi lăm", + "80": "tám mươi", + "81": "tám mươi mốt", + "85": "tám mươi lăm", + "90": "chín mươi", + "91": "chín mươi mốt", + "95": "chín mươi lăm" + }, + "units" : [ + "trăm", + "ngàn", + "triệu", + "tỷ", + "nghìn tỷ" + ], + "unitExceptions": [] +} \ No newline at end of file diff --git a/dist/written-number.js b/dist/written-number.js index e11bf5f..09ac58c 100644 --- a/dist/written-number.js +++ b/dist/written-number.js @@ -1,1903 +1,312 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.writtenNumber = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i -1 &&\n (unit.useBaseExceptionWhenNoTrailingNumbers\n ? i === 0 && ret.length\n : true);\n if (!shouldUseBaseException) {\n ret.push(\n alternativeBaseCardinals[r * scale[i]] || baseCardinals[r * scale[i]]\n );\n } else {\n ret.push(r > 1 && unit.plural ? unit.plural : unit.singular);\n }\n continue;\n }\n\n var str;\n if (typeof unit === \"string\") {\n str = unit;\n } else if (\n r === 1 ||\n (unit.useSingularEnding &&\n r % 10 === 1 &&\n (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0))\n ) {\n str = unit.singular;\n } else if (\n unit.few &&\n ((r > 1 && r < 5) ||\n (unit.useFewEnding &&\n r % 10 > 1 &&\n r % 10 < 5 &&\n (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0)))\n ) {\n str = unit.few;\n } else {\n str =\n unit.plural && (!unit.avoidInNumberPlural || !m)\n ? unit.plural\n : unit.singular;\n\n // Languages with dual\n str = r === 2 && unit.dual ? unit.dual : str;\n\n // \"restrictedPlural\" : use plural only for 3 to 10\n str = r > 10 && unit.restrictedPlural ? unit.singular : str;\n }\n\n if (\n unit.avoidPrefixException &&\n unit.avoidPrefixException.indexOf(r) > -1\n ) {\n ret.push(str);\n continue;\n }\n\n var exception = language.unitExceptions[r];\n var number =\n exception ||\n writtenNumber(\n r,\n util.defaults(\n {\n // Languages with and exceptions need to set `noAnd` to false\n noAnd:\n !(\n (language.andException && language.andException[r]) ||\n unit.andException\n ) && true,\n alternativeBase: unit.useAlternativeBase\n },\n options\n )\n );\n n -= r * scale[i];\n ret.push(number + \" \" + str);\n }\n\n var firstSignificantN = firstSignificant * Math.floor(n / firstSignificant);\n var rest = n - firstSignificantN;\n\n if (\n language.andWhenTrailing &&\n firstSignificant &&\n 0 < rest &&\n ret[0].indexOf(language.unitSeparator) !== 0\n ) {\n ret = [ret[0], language.unitSeparator.replace(/\\s+$/, \"\")].concat(\n ret.slice(1)\n );\n }\n\n // Languages that have separators for all cardinals.\n if (language.allSeparator) {\n for (var j = 0; j < ret.length - 1; j++) {\n ret[j] = language.allSeparator + ret[j];\n }\n }\n var result = ret.reverse().join(\" \");\n return result;\n}\n\nfunction handleSmallerThan100(\n n,\n language,\n unit,\n baseCardinals,\n alternativeBaseCardinals,\n options\n) {\n var dec = Math.floor(n / 10) * 10;\n unit = n - dec;\n if (unit) {\n return (\n alternativeBaseCardinals[dec] ||\n baseCardinals[dec] + language.baseSeparator + writtenNumber(unit, options)\n );\n }\n return alternativeBaseCardinals[dec] || baseCardinals[dec];\n}\n\n\n//# sourceURL=webpack://writtenNumber/./lib/core.js?"); - "20": "عشرون", - "21": "واحد وعشرون", - "22": "اثنان وعشرون", - "23": "ثلاثة وعشرون", - "24": "أربعة وعشرون", - "25": "خمسة وعشرون", - "26": "ستة وعشرون", - "27": "سبعة وعشرون", - "28": "ثمانية وعشرون", - "29": "تسعة وعشرون", - - "30": "ثلاثون", - "31": "واحد وثلاثون", - "32": "اثنان وثلاثون", - "33": "ثلاثة وثلاثون", - "34": "أربعة وثلاثون", - "35": "خمسة وثلاثون", - "36": "ستة وثلاثون", - "37": "سبعة وثلاثون", - "38": "ثمانية وثلاثون", - "39": "تسعة وثلاثون", +/***/ }), - "40": "أربعون", - "41": "واحد وأربعون", - "42": "اثنان وأربعون", - "43": "ثلاثة وأربعون", - "44": "أربعة وأربعون", - "45": "خمسة وأربعون", - "46": "ستة وأربعون", - "47": "سبعة وأربعون", - "48": "ثمانية وأربعون", - "49": "تسعة وأربعون", +/***/ "./lib/i18n/ar.json": +/*!**************************!*\ + !*** ./lib/i18n/ar.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, allSeparator, base, units, unitExceptions, default */ +/***/ (function(module) { - "50": "خمسون", - "51": "واحد وخمسون", - "52": "اثنان وخمسون", - "53": "ثلاثة وخمسون", - "54": "أربعة وخمسون", - "55": "خمسة وخمسون", - "56": "ستة وخمسون", - "57": "سبعة وخمسون", - "58": "ثمانية وخمسون", - "59": "تسعة وخمسون", +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\"\\\",\\\"unitSeparator\\\":\\\"\\\",\\\"allSeparator\\\":\\\"و\\\",\\\"base\\\":{\\\"0\\\":\\\"صفر\\\",\\\"1\\\":\\\"واحد\\\",\\\"2\\\":\\\"اثنان\\\",\\\"3\\\":\\\"ثلاثة\\\",\\\"4\\\":\\\"أربعة\\\",\\\"5\\\":\\\"خمسة\\\",\\\"6\\\":\\\"ستة\\\",\\\"7\\\":\\\"سبعة\\\",\\\"8\\\":\\\"ثمانية\\\",\\\"9\\\":\\\"تسعة\\\",\\\"10\\\":\\\"عشرة\\\",\\\"11\\\":\\\"أحد عشر\\\",\\\"12\\\":\\\"إثنا عشر\\\",\\\"13\\\":\\\"ثلاثة عشر\\\",\\\"14\\\":\\\"أربعة عشر\\\",\\\"15\\\":\\\"خمسة عشر\\\",\\\"16\\\":\\\"ستة عشر\\\",\\\"17\\\":\\\"سبعة عشر\\\",\\\"18\\\":\\\"ثمانية عشر\\\",\\\"19\\\":\\\"تسعة عشر\\\",\\\"20\\\":\\\"عشرون\\\",\\\"21\\\":\\\"واحد وعشرون\\\",\\\"22\\\":\\\"اثنان وعشرون\\\",\\\"23\\\":\\\"ثلاثة وعشرون\\\",\\\"24\\\":\\\"أربعة وعشرون\\\",\\\"25\\\":\\\"خمسة وعشرون\\\",\\\"26\\\":\\\"ستة وعشرون\\\",\\\"27\\\":\\\"سبعة وعشرون\\\",\\\"28\\\":\\\"ثمانية وعشرون\\\",\\\"29\\\":\\\"تسعة وعشرون\\\",\\\"30\\\":\\\"ثلاثون\\\",\\\"31\\\":\\\"واحد وثلاثون\\\",\\\"32\\\":\\\"اثنان وثلاثون\\\",\\\"33\\\":\\\"ثلاثة وثلاثون\\\",\\\"34\\\":\\\"أربعة وثلاثون\\\",\\\"35\\\":\\\"خمسة وثلاثون\\\",\\\"36\\\":\\\"ستة وثلاثون\\\",\\\"37\\\":\\\"سبعة وثلاثون\\\",\\\"38\\\":\\\"ثمانية وثلاثون\\\",\\\"39\\\":\\\"تسعة وثلاثون\\\",\\\"40\\\":\\\"أربعون\\\",\\\"41\\\":\\\"واحد وأربعون\\\",\\\"42\\\":\\\"اثنان وأربعون\\\",\\\"43\\\":\\\"ثلاثة وأربعون\\\",\\\"44\\\":\\\"أربعة وأربعون\\\",\\\"45\\\":\\\"خمسة وأربعون\\\",\\\"46\\\":\\\"ستة وأربعون\\\",\\\"47\\\":\\\"سبعة وأربعون\\\",\\\"48\\\":\\\"ثمانية وأربعون\\\",\\\"49\\\":\\\"تسعة وأربعون\\\",\\\"50\\\":\\\"خمسون\\\",\\\"51\\\":\\\"واحد وخمسون\\\",\\\"52\\\":\\\"اثنان وخمسون\\\",\\\"53\\\":\\\"ثلاثة وخمسون\\\",\\\"54\\\":\\\"أربعة وخمسون\\\",\\\"55\\\":\\\"خمسة وخمسون\\\",\\\"56\\\":\\\"ستة وخمسون\\\",\\\"57\\\":\\\"سبعة وخمسون\\\",\\\"58\\\":\\\"ثمانية وخمسون\\\",\\\"59\\\":\\\"تسعة وخمسون\\\",\\\"60\\\":\\\"ستون\\\",\\\"61\\\":\\\"واحد وستون\\\",\\\"62\\\":\\\"اثنان وستون\\\",\\\"63\\\":\\\"ثلاثة وستون\\\",\\\"64\\\":\\\"أربعة وستون\\\",\\\"65\\\":\\\"خمسة وستون\\\",\\\"66\\\":\\\"ستة وستون\\\",\\\"67\\\":\\\"سبعة وستون\\\",\\\"68\\\":\\\"ثمانية وستون\\\",\\\"69\\\":\\\"تسعة وستون\\\",\\\"70\\\":\\\"سبعون\\\",\\\"71\\\":\\\"واحد وسبعون\\\",\\\"72\\\":\\\"اثنان وسبعون\\\",\\\"73\\\":\\\"ثلاثة وسبعون\\\",\\\"74\\\":\\\"أربعة وسبعون\\\",\\\"75\\\":\\\"خمسة وسبعون\\\",\\\"76\\\":\\\"ستة وسبعون\\\",\\\"77\\\":\\\"سبعة وسبعون\\\",\\\"78\\\":\\\"ثمانية وسبعون\\\",\\\"79\\\":\\\"تسعة وسبعون\\\",\\\"80\\\":\\\"ثمانون\\\",\\\"81\\\":\\\"واحد وثمانون\\\",\\\"82\\\":\\\"اثنان وثمانون\\\",\\\"83\\\":\\\"ثلاثة وثمانون\\\",\\\"84\\\":\\\"أربعة وثمانون\\\",\\\"85\\\":\\\"خمسة وثمانون\\\",\\\"86\\\":\\\"ستة وثمانون\\\",\\\"87\\\":\\\"سبعة وثمانون\\\",\\\"88\\\":\\\"ثمانية وثمانون\\\",\\\"89\\\":\\\"تسعة وثمانون\\\",\\\"90\\\":\\\"تسعون\\\",\\\"91\\\":\\\"واحد وتسعون\\\",\\\"92\\\":\\\"اثنان وتسعون\\\",\\\"93\\\":\\\"ثلاثة وتسعون\\\",\\\"94\\\":\\\"أربعة وتسعون\\\",\\\"95\\\":\\\"خمسة وتسعون\\\",\\\"96\\\":\\\"ستة وتسعون\\\",\\\"97\\\":\\\"سبعة وتسعون\\\",\\\"98\\\":\\\"ثمانية وتسعون\\\",\\\"99\\\":\\\"تسعة وتسعون\\\",\\\"200\\\":\\\"مائتان\\\",\\\"300\\\":\\\"ثلاثمائة\\\",\\\"400\\\":\\\"أربعمائة\\\",\\\"500\\\":\\\"خمسمائة\\\",\\\"600\\\":\\\"ستمائة\\\",\\\"700\\\":\\\"سبعمائة\\\",\\\"800\\\":\\\"ثمانمائة\\\",\\\"900\\\":\\\"تسعمائة\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"مائة\\\",\\\"useBaseInstead\\\":true,\\\"useBaseException\\\":[1]},{\\\"singular\\\":\\\"ألف\\\",\\\"dual\\\":\\\"ألفان\\\",\\\"plural\\\":\\\"آلاف\\\",\\\"restrictedPlural\\\":true,\\\"avoidPrefixException\\\":[1,2]},{\\\"singular\\\":\\\"مليون\\\",\\\"dual\\\":\\\"مليونان\\\",\\\"plural\\\":\\\"ملايين\\\",\\\"restrictedPlural\\\":true,\\\"avoidPrefixException\\\":[1,2]},{\\\"singular\\\":\\\"مليار\\\",\\\"dual\\\":\\\"ملياران\\\",\\\"plural\\\":\\\"ملايير\\\",\\\"restrictedPlural\\\":true,\\\"avoidPrefixException\\\":[1,2]},{\\\"singular\\\":\\\"تريليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"كوادريليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"كوينتليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"سكستليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"سبتيلليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"أوكتيليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"نونيلليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"دشيليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"أوندشيلليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"دودشيليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"تريدشيليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"كواتوردشيليون\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"كويندشيليون\\\",\\\"avoidPrefixException\\\":[1]}],\\\"unitExceptions\\\":{}}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/ar.json?"); - "60": "ستون", - "61": "واحد وستون", - "62": "اثنان وستون", - "63": "ثلاثة وستون", - "64": "أربعة وستون", - "65": "خمسة وستون", - "66": "ستة وستون", - "67": "سبعة وستون", - "68": "ثمانية وستون", - "69": "تسعة وستون", +/***/ }), - "70": "سبعون", - "71": "واحد وسبعون", - "72": "اثنان وسبعون", - "73": "ثلاثة وسبعون", - "74": "أربعة وسبعون", - "75": "خمسة وسبعون", - "76": "ستة وسبعون", - "77": "سبعة وسبعون", - "78": "ثمانية وسبعون", - "79": "تسعة وسبعون", +/***/ "./lib/i18n/az.json": +/*!**************************!*\ + !*** ./lib/i18n/az.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, units, unitExceptions, default */ +/***/ (function(module) { - "80": "ثمانون", - "81": "واحد وثمانون", - "82": "اثنان وثمانون", - "83": "ثلاثة وثمانون", - "84": "أربعة وثمانون", - "85": "خمسة وثمانون", - "86": "ستة وثمانون", - "87": "سبعة وثمانون", - "88": "ثمانية وثمانون", - "89": "تسعة وثمانون", - - "90": "تسعون", - "91": "واحد وتسعون", - "92": "اثنان وتسعون", - "93": "ثلاثة وتسعون", - "94": "أربعة وتسعون", - "95": "خمسة وتسعون", - "96": "ستة وتسعون", - "97": "سبعة وتسعون", - "98": "ثمانية وتسعون", - "99": "تسعة وتسعون", +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\" \\\",\\\"unitSeparator\\\":\\\"\\\",\\\"base\\\":{\\\"0\\\":\\\"sıfır\\\",\\\"1\\\":\\\"bir\\\",\\\"2\\\":\\\"iki\\\",\\\"3\\\":\\\"üç\\\",\\\"4\\\":\\\"dörd\\\",\\\"5\\\":\\\"beş\\\",\\\"6\\\":\\\"altı\\\",\\\"7\\\":\\\"yeddi\\\",\\\"8\\\":\\\"səkkiz\\\",\\\"9\\\":\\\"doqquz\\\",\\\"10\\\":\\\"on\\\",\\\"20\\\":\\\"iyirmi\\\",\\\"30\\\":\\\"otuz\\\",\\\"40\\\":\\\"qırx\\\",\\\"50\\\":\\\"əlli\\\",\\\"60\\\":\\\"altmış\\\",\\\"70\\\":\\\"yetmiş\\\",\\\"80\\\":\\\"səksən\\\",\\\"90\\\":\\\"doxsan\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"yüz\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"min\\\",\\\"avoidPrefixException\\\":[1]},\\\"milyon\\\",\\\"milyard\\\",\\\"trilyon\\\",\\\"kvadrilyon\\\",\\\"kentilyon\\\",\\\"sekstilyon\\\",\\\"septilyon\\\",\\\"oktilyon\\\",\\\"nonilyon\\\",\\\"desilyon\\\",\\\"andesilyon\\\",\\\"dodesilyon\\\",\\\"tredesilyon\\\",\\\"katordesilyon\\\",\\\"kendesilyon\\\"],\\\"unitExceptions\\\":[]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/az.json?"); - "200": "مائتان", - "300": "ثلاثمائة", - "400": "أربعمائة", - "500": "خمسمائة", - "600": "ستمائة", - "700": "سبعمائة", - "800": "ثمانمائة", - "900": "تسعمائة" - }, - "units" : [ - {"singular":"مائة", "useBaseInstead": true, "useBaseException": [1]}, - {"singular":"ألف", "dual":"ألفان", "plural":"آلاف", "restrictedPlural": true, "avoidPrefixException": [1, 2]}, - {"singular":"مليون", "dual":"مليونان", "plural":"ملايين", "restrictedPlural": true, "avoidPrefixException": [1, 2]}, - {"singular":"مليار", "dual":"ملياران", "plural":"ملايير", "restrictedPlural": true, "avoidPrefixException": [1, 2]}, +/***/ }), - {"singular":"تريليون", "avoidPrefixException": [1]}, - {"singular":"كوادريليون", "avoidPrefixException": [1]}, - {"singular":"كوينتليون", "avoidPrefixException": [1]}, - {"singular":"سكستليون", "avoidPrefixException": [1]}, - {"singular":"سبتيلليون", "avoidPrefixException": [1]}, - {"singular":"أوكتيليون", "avoidPrefixException": [1]}, - {"singular":"نونيلليون", "avoidPrefixException": [1]}, - {"singular":"دشيليون", "avoidPrefixException": [1]}, - {"singular":"أوندشيلليون", "avoidPrefixException": [1]}, - {"singular":"دودشيليون", "avoidPrefixException": [1]}, - {"singular":"تريدشيليون", "avoidPrefixException": [1]}, - {"singular":"كواتوردشيليون", "avoidPrefixException": [1]}, - {"singular":"كويندشيليون" , "avoidPrefixException": [1]} - ], - "unitExceptions": {} -} -},{}],2:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": " ", - "unitSeparator": "", - "base": { - "0": "sıfır", - "1": "bir", - "2": "iki", - "3": "üç", - "4": "dörd", - "5": "beş", - "6": "altı", - "7": "yeddi", - "8": "səkkiz", - "9": "doqquz", - "10": "on", - "20": "iyirmi", - "30": "otuz", - "40": "qırx", - "50": "əlli", - "60": "altmış", - "70": "yetmiş", - "80": "səksən", - "90": "doxsan" - }, - "units" : [ - { - "singular": "yüz", - "avoidPrefixException": [1] - }, - { - "singular": "min", - "avoidPrefixException": [1] - }, - "milyon", - "milyard", - "trilyon", - "kvadrilyon", - "kentilyon", - "sekstilyon", - "septilyon", - "oktilyon", - "nonilyon", - "desilyon", - "andesilyon", - "dodesilyon", - "tredesilyon", - "katordesilyon", - "kendesilyon" - ], - "unitExceptions": [] - } -},{}],3:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": "-", - "unitSeparator": "and ", - "base": { - "0": "zero", - "1": "one", - "2": "two", - "3": "three", - "4": "four", - "5": "five", - "6": "six", - "7": "seven", - "8": "eight", - "9": "nine", - "10": "ten", - "11": "eleven", - "12": "twelve", - "13": "thirteen", - "14": "fourteen", - "15": "fifteen", - "16": "sixteen", - "17": "seventeen", - "18": "eighteen", - "19": "nineteen", - "20": "twenty", - "30": "thirty", - "40": "forty", - "50": "fifty", - "60": "sixty", - "70": "seventy", - "80": "eighty", - "90": "ninety" - }, - "units" : { - "2": "hundred", - "3": "thousand", - "5": "lakh", - "7": "crore" - }, - "unitExceptions": [] -} -},{}],4:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": "-", - "unitSeparator": "and ", - "base": { - "0": "zero", - "1": "one", - "2": "two", - "3": "three", - "4": "four", - "5": "five", - "6": "six", - "7": "seven", - "8": "eight", - "9": "nine", - "10": "ten", - "11": "eleven", - "12": "twelve", - "13": "thirteen", - "14": "fourteen", - "15": "fifteen", - "16": "sixteen", - "17": "seventeen", - "18": "eighteen", - "19": "nineteen", - "20": "twenty", - "30": "thirty", - "40": "forty", - "50": "fifty", - "60": "sixty", - "70": "seventy", - "80": "eighty", - "90": "ninety" - }, - "units" : [ - "hundred", - "thousand", - "million", - "billion", - "trillion", - "quadrillion", - "quintillion", - "sextillion", - "septillion", - "octillion", - "nonillion", - "decillion", - "undecillion", - "duodecillion", - "tredecillion", - "quattuordecillion", - "quindecillion" - ], - "unitExceptions": [] -} -},{}],5:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": " ", - "unitSeparator": "", - "base": { - "0": "nulo", - "1": "unu", - "2": "du", - "3": "tri", - "4": "kvar", - "5": "kvin", - "6": "ses", - "7": "sep", - "8": "ok", - "9": "naŭ", - "10": "dek", - "20": "dudek", - "30": "tridek", - "40": "kvardek", - "50": "kvindek", - "60": "sesdek", - "70": "sepdek", - "80": "okdek", - "90": "naŭdek", - "100": "cent", - "200": "ducent", - "300": "tricent", - "400": "kvarcent", - "500": "kvincent", - "600": "sescent", - "700": "sepcent", - "800": "okcent", - "900": "naŭcent" - }, - "units" : [ - { - "useBaseInstead": true, - "useBaseException": [] - }, - { - "singular": "mil", - "avoidPrefixException": [1] - }, - { - "singular": "miliono", - "plural": "milionoj", - "avoidPrefixException": [1] - }, - { - "singular": "miliardo", - "plural": "miliardoj", - "avoidPrefixException": [1] - }, - { - "singular": "biliono", - "plural": "bilionoj", - "avoidPrefixException": [1] - } - ], - "unitExceptions": [] -} +/***/ "./lib/i18n/en-indian.json": +/*!*********************************!*\ + !*** ./lib/i18n/en-indian.json ***! + \*********************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, units, unitExceptions, default */ +/***/ (function(module) { -},{}],6:[function(require,module,exports){ -module.exports={ - "useLongScale": true, - "baseSeparator": " y ", - "unitSeparator": "", - "base": { - "0": "cero", - "1": "uno", - "2": "dos", - "3": "tres", - "4": "cuatro", - "5": "cinco", - "6": "seis", - "7": "siete", - "8": "ocho", - "9": "nueve", - "10": "diez", - "11": "once", - "12": "doce", - "13": "trece", - "14": "catorce", - "15": "quince", - "16": "dieciséis", - "17": "diecisiete", - "18": "dieciocho", - "19": "diecinueve", - "20": "veinte", - "21": "veintiuno", - "22": "veintidós", - "23": "veintitrés", - "24": "veinticuatro", - "25": "veinticinco", - "26": "veintiséis", - "27": "veintisiete", - "28": "veintiocho", - "29": "veintinueve", - "30": "treinta", - "40": "cuarenta", - "50": "cincuenta", - "60": "sesenta", - "70": "setenta", - "80": "ochenta", - "90": "noventa", - "100": "cien", - "200": "doscientos", - "300": "trescientos", - "400": "cuatrocientos", - "500": "quinientos", - "600": "seiscientos", - "700": "setecientos", - "800": "ochocientos", - "900": "novecientos", - "1000": "mil" - }, - "unitExceptions": { - "1000000": "un millón", - "1000000000000": "un billón", - "1000000000000000000": "un trillón", - "1000000000000000000000000": "un cuatrillones", - "1000000000000000000000000000000": "un quintillón", - "1000000000000000000000000000000000000": "un sextillón", - "1000000000000000000000000000000000000000000": "un septillón", - "1000000000000000000000000000000000000000000000000": "un octillón", - "1000000000000000000000000000000000000000000000000000000": "un nonillón", - "1000000000000000000000000000000000000000000000000000000000000": "un decillón", - "1000000000000000000000000000000000000000000000000000000000000000000": "un undecillón", - "1000000000000000000000000000000000000000000000000000000000000000000000000": "un duodecillón", - "1000000000000000000000000000000000000000000000000000000000000000000000000000000": "un tredecillón", - "1000000000000000000000000000000000000000000000000000000000000000000000000000000000000": "un cuatordecillón", - "1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": "un quindecillón" - }, - "units" : [ - { - "singular": "ciento", - "useBaseInstead": true, - "useBaseException": [1] - }, - { - "singular": "mil", - "avoidPrefixException": [1] - }, - { - "singular": "millón", - "plural": "millones" - }, - { - "singular": "billón", - "plural": "billones" - }, - { - "singular": "trillón", - "plural": "trillones" - }, - { - "singular": "cuatrillón", - "plural": "cuatrillones" - }, - { - "singular": "quintillón", - "plural": "quintillones" - }, - { - "singular": "sextillón", - "plural": "sextillones" - }, - { - "singular": "septillón", - "plural": "septillones" - }, - { - "singular": "octillón", - "plural": "octillones" - }, - { - "singular": "nonillón", - "plural": "nonillones" - }, - { - "singular": "decillón", - "plural": "decillones" - }, - { - "singular": "undecillón", - "plural": "undecillones" - }, - { - "singular": "duodecillón", - "plural": "duodecillones" - }, - { - "singular": "tredecillón", - "plural": "tredecillones" - }, - { - "singular": "cuatrodecillón", - "plural": "cuatrodecillones" - }, - { - "singular": "quindecillón", - "plural": "quindecillones" - } - ] -} +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\"-\\\",\\\"unitSeparator\\\":\\\"and \\\",\\\"base\\\":{\\\"0\\\":\\\"zero\\\",\\\"1\\\":\\\"one\\\",\\\"2\\\":\\\"two\\\",\\\"3\\\":\\\"three\\\",\\\"4\\\":\\\"four\\\",\\\"5\\\":\\\"five\\\",\\\"6\\\":\\\"six\\\",\\\"7\\\":\\\"seven\\\",\\\"8\\\":\\\"eight\\\",\\\"9\\\":\\\"nine\\\",\\\"10\\\":\\\"ten\\\",\\\"11\\\":\\\"eleven\\\",\\\"12\\\":\\\"twelve\\\",\\\"13\\\":\\\"thirteen\\\",\\\"14\\\":\\\"fourteen\\\",\\\"15\\\":\\\"fifteen\\\",\\\"16\\\":\\\"sixteen\\\",\\\"17\\\":\\\"seventeen\\\",\\\"18\\\":\\\"eighteen\\\",\\\"19\\\":\\\"nineteen\\\",\\\"20\\\":\\\"twenty\\\",\\\"30\\\":\\\"thirty\\\",\\\"40\\\":\\\"forty\\\",\\\"50\\\":\\\"fifty\\\",\\\"60\\\":\\\"sixty\\\",\\\"70\\\":\\\"seventy\\\",\\\"80\\\":\\\"eighty\\\",\\\"90\\\":\\\"ninety\\\"},\\\"units\\\":{\\\"2\\\":\\\"hundred\\\",\\\"3\\\":\\\"thousand\\\",\\\"5\\\":\\\"lakh\\\",\\\"7\\\":\\\"crore\\\"},\\\"unitExceptions\\\":[]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/en-indian.json?"); -},{}],7:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": "-", - "unitSeparator": "", - "base": { - "0": "zéro", - "1": "un", - "2": "deux", - "3": "trois", - "4": "quatre", - "5": "cinq", - "6": "six", - "7": "sept", - "8": "huit", - "9": "neuf", - "10": "dix", - "11": "onze", - "12": "douze", - "13": "treize", - "14": "quatorze", - "15": "quinze", - "16": "seize", - "17": "dix-sept", - "18": "dix-huit", - "19": "dix-neuf", - "20": "vingt", - "30": "trente", - "40": "quarante", - "50": "cinquante", - "60": "soixante", - "70": "soixante-dix", - "80": "quatre-vingt", - "90": "quatre-vingt-dix" - }, - "units" : [ - { - "singular": "cent", - "plural": "cents", - "avoidInNumberPlural": true, - "avoidPrefixException": [1] - }, - { - "singular": "mille", - "avoidPrefixException": [1] - }, - { - "singular": "million", - "plural": "millions" - }, - { - "singular": "milliard", - "plural": "milliards" - }, - { - "singular": "billion", - "plural": "billions" - }, - { - "singular": "billiard", - "plural": "billiards" - }, - { - "singular": "trillion", - "plural": "trillions" - }, - { - "singular": "trilliard", - "plural": "trilliards" - }, - { - "singular": "quadrillion", - "plural": "quadrillions" - }, - { - "singular": "quadrilliard", - "plural": "quadrilliards" - }, - { - "singular": "quintillion", - "plural": "quintillions" - }, - { - "singular": "quintilliard", - "plural": "quintilliards" - }, - { - "singular": "sextillion", - "plural": "sextillions" - }, - { - "singular": "sextilliard", - "plural": "sextilliards" - }, - { - "singular": "septillion", - "plural": "septillions" - }, - { - "singular": "septilliard", - "plural": "septilliards" - }, - { - "singular": "octillion", - "plural": "octillions" - } - ], - "unitExceptions": { - "21": "vingt et un", - "31": "trente et un", - "41": "quarante et un", - "51": "cinquante et un", - "61": "soixante et un", - "71": "soixante et onze", - "72": "soixante-douze", - "73": "soixante-treize", - "74": "soixante-quatorze", - "75": "soixante-quinze", - "76": "soixante-seize", - "77": "soixante-dix-sept", - "78": "soixante-dix-huit", - "79": "soixante-dix-neuf", - "80": "quatre-vingts", - "91": "quatre-vingt-onze", - "92": "quatre-vingt-douze", - "93": "quatre-vingt-treize", - "94": "quatre-vingt-quatorze", - "95": "quatre-vingt-quinze", - "96": "quatre-vingt-seize", - "97": "quatre-vingt-dix-sept", - "98": "quatre-vingt-dix-huit", - "99": "quatre-vingt-dix-neuf" - } -} +/***/ }), -},{}],8:[function(require,module,exports){ -module.exports={ - "useLongScale": true, - "baseSeparator": "", - "unitSeparator": "és ", - "base": { - "0": "nulla", - "1": "egy", - "2": "kettő", - "3": "három", - "4": "négy", - "5": "öt", - "6": "hat", - "7": "hét", - "8": "nyolc", - "9": "kilenc", - "10": "tíz", - "11": "tizenegy", - "12": "tizenkettő", - "13": "tizenhárom", - "14": "tizennégy", - "15": "tizenöt", - "16": "tizenhat", - "17": "tizenhét", - "18": "tizennyolc", - "19": "tizenkilenc", - "20": "húsz", - "21": "huszonegy", - "22": "huszonkettő", - "23": "huszonhárom", - "24": "huszonnégy", - "25": "huszonöt", - "26": "huszonhat", - "27": "huszonhét", - "28": "huszonnyolc", - "29": "huszonkilenc", - "30": "harminc", - "40": "negyven", - "50": "ötven", - "60": "hatvan", - "70": "hetven", - "80": "nyolcvan", - "90": "kilencven", - "100": "száz", - "200": "kétszáz", - "300": "háromszáz", - "400": "négyszáz", - "500": "ötszáz", - "600": "hatszáz", - "700": "hétszáz", - "800": "nyolcszáz", - "900": "kilencszáz", - "1000": "ezer" - }, - "unitExceptions": { - "1": "egy" - }, - "units" : [ - { - "singular": "száz", - "useBaseInstead": true, - "useBaseException": [1] - }, - { - "singular": "ezer", - "avoidPrefixException": [1] - }, - { - "singular": "millió", - "avoidPrefixException": [1] - }, - { - "singular": "milliárd", - "avoidPrefixException": [1] - }, - { - "singular": "-billió", - "avoidPrefixException": [1] - }, - { - "singular": "billiárd", - "avoidPrefixException": [1] - }, - { - "singular": "trillió", - "avoidPrefixException": [1] - }, - { - "singular": "trilliárd", - "avoidPrefixException": [1] - }, - { - "singular": "kvadrillió", - "avoidPrefixException": [1] - }, - { - "singular": "kvadrilliárd", - "avoidPrefixException": [1] - }, - { - "singular": "kvintillió", - "avoidPrefixException": [1] - }, - { - "singular": "kvintilliárd", - "avoidPrefixException": [1] - }, - { - "singular": "szextillió", - "avoidPrefixException": [1] - }, - { - "singular": "szeptillió", - "avoidPrefixException": [1] - }, - { - "singular": "oktillió", - "avoidPrefixException": [1] - }, - { - "singular": "nonillió", - "avoidPrefixException": [1] - } - ] -} +/***/ "./lib/i18n/en.json": +/*!**************************!*\ + !*** ./lib/i18n/en.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, units, unitExceptions, default */ +/***/ (function(module) { -},{}],9:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": " ", - "unitSeparator": "", - "base": { - "0": "nol", - "1": "satu", - "2": "dua", - "3": "tiga", - "4": "empat", - "5": "lima", - "6": "enam", - "7": "tujuh", - "8": "delapan", - "9": "sembilan", - "10": "sepuluh", - "11": "sebelas", - "12": "dua belas", - "13": "tiga belas", - "14": "empat belas", - "15": "lima belas", - "16": "enam belas", - "17": "tujuh belas", - "18": "delapan belas", - "19": "sembilan belas", - "20": "dua puluh", - "30": "tiga puluh", - "40": "empat puluh", - "50": "lima puluh", - "60": "enam puluh", - "70": "tujuh puluh", - "80": "delapan puluh", - "90": "sembilan puluh" - }, - "units" : [ - { - "singular": "seratus", - "plural": "ratus", - "avoidPrefixException": [1] - }, - { - "singular": "seribu", - "plural": "ribu", - "avoidPrefixException": [1] - }, - "juta", - "miliar", - "triliun", - "kuadiliun" - ], - "unitExceptions": [] -} +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\"-\\\",\\\"unitSeparator\\\":\\\"and \\\",\\\"base\\\":{\\\"0\\\":\\\"zero\\\",\\\"1\\\":\\\"one\\\",\\\"2\\\":\\\"two\\\",\\\"3\\\":\\\"three\\\",\\\"4\\\":\\\"four\\\",\\\"5\\\":\\\"five\\\",\\\"6\\\":\\\"six\\\",\\\"7\\\":\\\"seven\\\",\\\"8\\\":\\\"eight\\\",\\\"9\\\":\\\"nine\\\",\\\"10\\\":\\\"ten\\\",\\\"11\\\":\\\"eleven\\\",\\\"12\\\":\\\"twelve\\\",\\\"13\\\":\\\"thirteen\\\",\\\"14\\\":\\\"fourteen\\\",\\\"15\\\":\\\"fifteen\\\",\\\"16\\\":\\\"sixteen\\\",\\\"17\\\":\\\"seventeen\\\",\\\"18\\\":\\\"eighteen\\\",\\\"19\\\":\\\"nineteen\\\",\\\"20\\\":\\\"twenty\\\",\\\"30\\\":\\\"thirty\\\",\\\"40\\\":\\\"forty\\\",\\\"50\\\":\\\"fifty\\\",\\\"60\\\":\\\"sixty\\\",\\\"70\\\":\\\"seventy\\\",\\\"80\\\":\\\"eighty\\\",\\\"90\\\":\\\"ninety\\\"},\\\"units\\\":[\\\"hundred\\\",\\\"thousand\\\",\\\"million\\\",\\\"billion\\\",\\\"trillion\\\",\\\"quadrillion\\\",\\\"quintillion\\\",\\\"sextillion\\\",\\\"septillion\\\",\\\"octillion\\\",\\\"nonillion\\\",\\\"decillion\\\",\\\"undecillion\\\",\\\"duodecillion\\\",\\\"tredecillion\\\",\\\"quattuordecillion\\\",\\\"quindecillion\\\"],\\\"unitExceptions\\\":[]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/en.json?"); -},{}],10:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": "", - "unitSeparator": "", - "generalSeparator": "", - "wordSeparator": "", - "base": { - "0": "zero", - "1": "uno", - "2": "due", - "3": "tre", - "4": "quattro", - "5": "cinque", - "6": "sei", - "7": "sette", - "8": "otto", - "9": "nove", - "10": "dieci", - "11": "undici", - "12": "dodici", - "13": "tredici", - "14": "quattordici", - "15": "quindici", - "16": "sedici", - "17": "diciassette", - "18": "diciotto", - "19": "diciannove", - "20": "venti", - "21": "ventuno", - "23": "ventitré", - "28": "ventotto", - "30": "trenta", - "31": "trentuno", - "33": "trentatré", - "38": "trentotto", - "40": "quaranta", - "41": "quarantuno", - "43": "quaranta­tré", - "48": "quarantotto", - "50": "cinquanta", - "51": "cinquantuno", - "53": "cinquantatré", - "58": "cinquantotto", - "60": "sessanta", - "61": "sessantuno", - "63": "sessanta­tré", - "68": "sessantotto", - "70": "settanta", - "71": "settantuno", - "73": "settantatré", - "78": "settantotto", - "80": "ottanta", - "81": "ottantuno", - "83": "ottantatré", - "88": "ottantotto", - "90": "novanta", - "91": "novantuno", - "93": "novantatré", - "98": "novantotto", - "100": "cento", - "101": "centuno", - "108": "centootto", - "180": "centottanta", - "201": "duecentuno", - "301": "tre­cent­uno", - "401": "quattro­cent­uno", - "501": "cinque­cent­uno", - "601": "sei­cent­uno", - "701": "sette­cent­uno", - "801": "otto­cent­uno", - "901": "nove­cent­uno" - }, - "unitExceptions": { - "1": "un" - }, - "units": [ - { - "singular": "cento", - "avoidPrefixException": [ - 1 - ] - }, - { - "singular": "mille", - "plural": "mila", - "avoidPrefixException": [ - 1 - ] - }, - { - "singular": "milione", - "plural": "milioni" - }, - { - "singular": "miliardo", - "plural": "miliardi" - }, - { - "singular": "bilione", - "plural": "bilioni" - }, - { - "singular": "biliardo", - "plural": "biliardi" - }, - { - "singular": "trilione", - "plural": "trilioni" - }, - { - "singular": "triliardo", - "plural": "triliardi" - }, - { - "singular": "quadrilione", - "plural": "quadrilioni" - }, - { - "singular": "quadriliardo", - "plural": "quadriliardi" - } - ] -} +/***/ }), -},{}],11:[function(require,module,exports){ -module.exports={ - "useLongScale": true, - "baseSeparator": " e ", - "unitSeparator": "e ", - "andWhenTrailing": true, - "base": { - "0": "zero", - "1": "um", - "2": "dois", - "3": "três", - "4": "quatro", - "5": "cinco", - "6": "seis", - "7": "sete", - "8": "oito", - "9": "nove", - "10": "dez", - "11": "onze", - "12": "doze", - "13": "treze", - "14": "catorze", - "15": "quinze", - "16": "dezasseis", - "17": "dezassete", - "18": "dezoito", - "19": "dezanove", - "20": "vinte", - "30": "trinta", - "40": "quarenta", - "50": "cinquenta", - "60": "sessenta", - "70": "setenta", - "80": "oitenta", - "90": "noventa", - "100": "cem", - "200": "duzentos", - "300": "trezentos", - "400": "quatrocentos", - "500": "quinhentos", - "600": "seiscentos", - "700": "setecentos", - "800": "oitocentos", - "900": "novecentos", - "1000": "mil" - }, - "unitExceptions": { - "1": "um" - }, - "units" : [ - { - "singular": "cento", - "useBaseInstead": true, - "useBaseException": [ - 1 - ], - "useBaseExceptionWhenNoTrailingNumbers": true, - "andException": true - }, - { - "singular": "mil", - "avoidPrefixException": [1], - "andException": true - }, - { - "singular": "milhão", - "plural": "milhões" - }, - { - "singular": "bilião", - "plural": "biliões" - }, - { - "singular": "trilião", - "plural": "triliões" - }, - { - "singular": "quadrilião", - "plural": "quadriliões" - }, - { - "singular": "quintilião", - "plural": "quintiliões" - }, - { - "singular": "sextilião", - "plural": "sextiliões" - }, - { - "singular": "septilião", - "plural": "septiliões" - }, - { - "singular": "octilião", - "plural": "octiliões" - }, - { - "singular": "nonilião", - "plural": "noniliões" - }, - { - "singular": "decilião", - "plural": "deciliões" - } - ] -} +/***/ "./lib/i18n/eo.json": +/*!**************************!*\ + !*** ./lib/i18n/eo.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, units, unitExceptions, default */ +/***/ (function(module) { -},{}],12:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": " e ", - "unitSeparator": "e ", - "andWhenTrailing": true, - "base": { - "0": "zero", - "1": "um", - "2": "dois", - "3": "três", - "4": "quatro", - "5": "cinco", - "6": "seis", - "7": "sete", - "8": "oito", - "9": "nove", - "10": "dez", - "11": "onze", - "12": "doze", - "13": "treze", - "14": "catorze", - "15": "quinze", - "16": "dezesseis", - "17": "dezessete", - "18": "dezoito", - "19": "dezenove", - "20": "vinte", - "30": "trinta", - "40": "quarenta", - "50": "cinquenta", - "60": "sessenta", - "70": "setenta", - "80": "oitenta", - "90": "noventa", - "100": "cem", - "200": "duzentos", - "300": "trezentos", - "400": "quatrocentos", - "500": "quinhentos", - "600": "seiscentos", - "700": "setecentos", - "800": "oitocentos", - "900": "novecentos", - "1000": "mil" - }, - "unitExceptions": { - "1": "um" - }, - "units" : [ - { - "singular": "cento", - "useBaseInstead": true, - "useBaseException": [ - 1 - ], - "useBaseExceptionWhenNoTrailingNumbers": true, - "andException": true - }, - { - "singular": "mil", - "avoidPrefixException": [1], - "andException": true - }, - { - "singular": "milhão", - "plural": "milhões" - }, - { - "singular": "bilhão", - "plural": "bilhões" - }, - { - "singular": "trilhão", - "plural": "trilhões" - }, - { - "singular": "quadrilhão", - "plural": "quadrilhão" - }, - { - "singular": "quintilhão", - "plural": "quintilhões" - }, - { - "singular": "sextilhão", - "plural": "sextilhões" - }, - { - "singular": "septilhão", - "plural": "septilhões" - }, - { - "singular": "octilhão", - "plural": "octilhões" - }, - { - "singular": "nonilhão", - "plural": "nonilhões" - }, - { - "singular": "decilhão", - "plural": "decilhões" - }, - { - "singular": "undecilhão", - "plural": "undecilhões" - }, - { - "singular": "doudecilhão", - "plural": "doudecilhões" - }, - { - "singular": "tredecilhão", - "plural": "tredecilhões" - } - ] -} +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\" \\\",\\\"unitSeparator\\\":\\\"\\\",\\\"base\\\":{\\\"0\\\":\\\"nulo\\\",\\\"1\\\":\\\"unu\\\",\\\"2\\\":\\\"du\\\",\\\"3\\\":\\\"tri\\\",\\\"4\\\":\\\"kvar\\\",\\\"5\\\":\\\"kvin\\\",\\\"6\\\":\\\"ses\\\",\\\"7\\\":\\\"sep\\\",\\\"8\\\":\\\"ok\\\",\\\"9\\\":\\\"naŭ\\\",\\\"10\\\":\\\"dek\\\",\\\"20\\\":\\\"dudek\\\",\\\"30\\\":\\\"tridek\\\",\\\"40\\\":\\\"kvardek\\\",\\\"50\\\":\\\"kvindek\\\",\\\"60\\\":\\\"sesdek\\\",\\\"70\\\":\\\"sepdek\\\",\\\"80\\\":\\\"okdek\\\",\\\"90\\\":\\\"naŭdek\\\",\\\"100\\\":\\\"cent\\\",\\\"200\\\":\\\"ducent\\\",\\\"300\\\":\\\"tricent\\\",\\\"400\\\":\\\"kvarcent\\\",\\\"500\\\":\\\"kvincent\\\",\\\"600\\\":\\\"sescent\\\",\\\"700\\\":\\\"sepcent\\\",\\\"800\\\":\\\"okcent\\\",\\\"900\\\":\\\"naŭcent\\\"},\\\"units\\\":[{\\\"useBaseInstead\\\":true,\\\"useBaseException\\\":[]},{\\\"singular\\\":\\\"mil\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"miliono\\\",\\\"plural\\\":\\\"milionoj\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"miliardo\\\",\\\"plural\\\":\\\"miliardoj\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"biliono\\\",\\\"plural\\\":\\\"bilionoj\\\",\\\"avoidPrefixException\\\":[1]}],\\\"unitExceptions\\\":[]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/eo.json?"); -},{}],13:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": " ", - "unitSeparator": "", - "base": { - "0": "ноль", - "1": "один", - "2": "два", - "3": "три", - "4": "четыре", - "5": "пять", - "6": "шесть", - "7": "семь", - "8": "восемь", - "9": "девять", - "10": "десять", - "11": "одинадцать", - "12": "двенадцать", - "13": "тринадцать", - "14": "четырнадцать", - "15": "пятнадцать", - "16": "шестнадцать", - "17": "семнадцать", - "18": "восемнадцать", - "19": "девятнадцать", - "20": "двадцать", - "30": "тридцать", - "40": "сорок", - "50": "пятьдесят", - "60": "шестьдесят", - "70": "семьдесят", - "80": "восемьдесят", - "90": "девяносто", - "100": "сто", - "200": "двести", - "300": "триста", - "400": "четыреста", - "500": "пятьсот", - "600": "шестьсот", - "700": "семьсот", - "800": "восемьсот", - "900": "девятьсот" - }, - "alternativeBase": { - "feminine": { - "1": "одна", - "2": "две" - } - }, - "units": [ - { - "useBaseInstead": true, - "useBaseException": [] - }, - { - "singular": "тысяча", - "few": "тысячи", - "plural": "тысяч", - "useAlternativeBase": "feminine", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "миллион", - "few": "миллиона", - "plural": "миллионов", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "миллиард", - "few": "миллиарда", - "plural": "миллиардов", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "триллион", - "few": "триллиона", - "plural": "триллионов", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "квадрильон", - "few": "квадриллион", - "plural": "квадрилон", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "квинтиллион", - "few": "квинтиллиона", - "plural": "квинтильонов", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "секстиллионов", - "few": "секстильона", - "plural": "секстиллионов", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "септиллион", - "few": "септиллиона", - "plural": "септиллионов", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "октиллион", - "few": "октиллиона", - "plural": "октиллионов", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "нониллион", - "few": "нониллиона", - "plural": "нониллионов", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "дециллион", - "few": "дециллиона", - "plural": "дециллионов", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "ундециллион", - "few": "ундециллиона", - "plural": "ундециллионив", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "дуодециллион", - "few": "дуодециллиона", - "plural": "дуодециллионив", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "тредециллион", - "few": "тредециллиона", - "plural": "тредециллионив", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "кватуордециллион", - "few": "кватуордециллиона", - "plural": "кватуордециллионив", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "квиндециллион", - "few": "квиндециллиона", - "plural": "квиндециллионив", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - } - ], - "unitExceptions": [] -} -},{}],14:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": " ", - "unitSeparator": "", - "base": { - "0": "sıfır", - "1": "bir", - "2": "iki", - "3": "üç", - "4": "dört", - "5": "beş", - "6": "altı", - "7": "yedi", - "8": "sekiz", - "9": "dokuz", - "10": "on", - "20": "yirmi", - "30": "otuz", - "40": "kırk", - "50": "elli", - "60": "altmış", - "70": "yetmiş", - "80": "seksen", - "90": "doksan" - }, - "units" : [ - { - "singular": "yüz", - "avoidPrefixException": [1] - }, - { - "singular": "bin", - "avoidPrefixException": [1] - }, - "milyon", - "milyar", - "trilyon", - "katrilyon", - "kentilyon", - "sekstilyon", - "septilyon", - "oktilyon", - "nonilyon", - "desilyon", - "andesilyon", - "dodesilyon", - "tredesilyon", - "katordesilyon", - "kendesilyon" - ], - "unitExceptions": [] -} -},{}],15:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": " ", - "unitSeparator": "", - "base": { - "0": "нуль", - "1": "один", - "2": "два", - "3": "три", - "4": "чотири", - "5": "п’ять", - "6": "шість", - "7": "сім", - "8": "вісім", - "9": "дев’ять", - "10": "десять", - "11": "одинадцять", - "12": "дванадцять", - "13": "тринадцять", - "14": "чотирнадцять", - "15": "п’ятнадцять", - "16": "шістнадцять", - "17": "сімнадцять", - "18": "вісімнадцять", - "19": "дев’ятнадцять", - "20": "двадцять", - "30": "тридцять", - "40": "сорок", - "50": "п’ятдесят", - "60": "шістдесят", - "70": "сімдесят", - "80": "вісімдесят", - "90": "дев’яносто", - "100": "сто", - "200": "двісті", - "300": "триста", - "400": "чотириста", - "500": "п’ятсот", - "600": "шістсот", - "700": "сімсот", - "800": "вісімсот", - "900": "дев’ятсот" - }, - "alternativeBase": { - "feminine": { - "1": "одна", - "2": "дві" - } - }, - "units" : [ - { - "useBaseInstead": true, - "useBaseException": [] - }, - { - "singular": "тисяча", - "few": "тисячі", - "plural": "тисяч", - "useAlternativeBase": "feminine", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "мільйон", - "few": "мільйони", - "plural": "мільйонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "мільярд", - "few": "мільярди", - "plural": "мільярдів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "трильйон", - "few": "трильйони", - "plural": "трильйонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "квадрильйон", - "few": "квадрильйони", - "plural": "квадрильйонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "квінтильйон", - "few": "квінтильйони", - "plural": "квінтильйонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "секстильйон", - "few": "секстильйони", - "plural": "секстильйонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "септілліон", - "few": "септілліони", - "plural": "септілліонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "октілліон", - "few": "октілліони", - "plural": "октілліонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "нонілліон", - "few": "нонілліони", - "plural": "нонілліонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "децілліон", - "few": "децілліони", - "plural": "децілліонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "ундецілліон", - "few": "ундецілліони", - "plural": "ундецілліонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "дуодецілліон", - "few": "дуодецілліони", - "plural": "дуодецілліонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "тредецілліон", - "few": "тредецілліони", - "plural": "тредецілліонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "кватуордецілліон", - "few": "кватуордецілліони", - "plural": "кватуордецілліонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - }, - { - "singular": "квіндецілліон", - "few": "квіндецілліони", - "plural": "квіндецілліонів", - "useSingularEnding": true, - "useFewEnding": true, - "avoidEndingRules": [11, 12, 13, 14, 111, 112, 113, 114, 211, 212, 213, 214, 311, 312, 313, 314, 411, 412, 413, 414, 511, 512, 513, 514, 611, 612, 613, 614, 711, 712, 713, 714, 811, 812, 813, 814, 911, 912, 913, 914] - } - ], - "unitExceptions": [] -} +/***/ }), -},{}],16:[function(require,module,exports){ -module.exports={ - "useLongScale": false, - "baseSeparator": " ", - "unitSeparator": "và ", - "base": { - "0": "không", - "1": "một", - "2": "hai", - "3": "ba", - "4": "bốn", - "5": "năm", - "6": "sáu", - "7": "bảy", - "8": "tám", - "9": "chín", - "10": "mười", - "15": "mười lăm", - "20": "hai mươi", - "21": "hai mươi mốt", - "25": "hai mươi lăm", - "30": "ba mươi", - "31": "ba mươi mốt", - "40": "bốn mươi", - "41": "bốn mươi mốt", - "45": "bốn mươi lăm", - "50": "năm mươi", - "51": "năm mươi mốt", - "55": "năm mươi lăm", - "60": "sáu mươi", - "61": "sáu mươi mốt", - "65": "sáu mươi lăm", - "70": "bảy mươi", - "71": "bảy mươi mốt", - "75": "bảy mươi lăm", - "80": "tám mươi", - "81": "tám mươi mốt", - "85": "tám mươi lăm", - "90": "chín mươi", - "91": "chín mươi mốt", - "95": "chín mươi lăm" - }, - "units" : [ - "trăm", - "ngàn", - "triệu", - "tỷ", - "nghìn tỷ" - ], - "unitExceptions": [] -} -},{}],17:[function(require,module,exports){ -"use strict"; -exports = module.exports = writtenNumber; -var util = require("./util"); +/***/ "./lib/i18n/es.json": +/*!**************************!*\ + !*** ./lib/i18n/es.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, unitExceptions, units, default */ +/***/ (function(module) { + +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":true,\\\"baseSeparator\\\":\\\" y \\\",\\\"unitSeparator\\\":\\\"\\\",\\\"base\\\":{\\\"0\\\":\\\"cero\\\",\\\"1\\\":\\\"uno\\\",\\\"2\\\":\\\"dos\\\",\\\"3\\\":\\\"tres\\\",\\\"4\\\":\\\"cuatro\\\",\\\"5\\\":\\\"cinco\\\",\\\"6\\\":\\\"seis\\\",\\\"7\\\":\\\"siete\\\",\\\"8\\\":\\\"ocho\\\",\\\"9\\\":\\\"nueve\\\",\\\"10\\\":\\\"diez\\\",\\\"11\\\":\\\"once\\\",\\\"12\\\":\\\"doce\\\",\\\"13\\\":\\\"trece\\\",\\\"14\\\":\\\"catorce\\\",\\\"15\\\":\\\"quince\\\",\\\"16\\\":\\\"dieciséis\\\",\\\"17\\\":\\\"diecisiete\\\",\\\"18\\\":\\\"dieciocho\\\",\\\"19\\\":\\\"diecinueve\\\",\\\"20\\\":\\\"veinte\\\",\\\"21\\\":\\\"veintiuno\\\",\\\"22\\\":\\\"veintidós\\\",\\\"23\\\":\\\"veintitrés\\\",\\\"24\\\":\\\"veinticuatro\\\",\\\"25\\\":\\\"veinticinco\\\",\\\"26\\\":\\\"veintiséis\\\",\\\"27\\\":\\\"veintisiete\\\",\\\"28\\\":\\\"veintiocho\\\",\\\"29\\\":\\\"veintinueve\\\",\\\"30\\\":\\\"treinta\\\",\\\"40\\\":\\\"cuarenta\\\",\\\"50\\\":\\\"cincuenta\\\",\\\"60\\\":\\\"sesenta\\\",\\\"70\\\":\\\"setenta\\\",\\\"80\\\":\\\"ochenta\\\",\\\"90\\\":\\\"noventa\\\",\\\"100\\\":\\\"cien\\\",\\\"200\\\":\\\"doscientos\\\",\\\"300\\\":\\\"trescientos\\\",\\\"400\\\":\\\"cuatrocientos\\\",\\\"500\\\":\\\"quinientos\\\",\\\"600\\\":\\\"seiscientos\\\",\\\"700\\\":\\\"setecientos\\\",\\\"800\\\":\\\"ochocientos\\\",\\\"900\\\":\\\"novecientos\\\",\\\"1000\\\":\\\"mil\\\"},\\\"unitExceptions\\\":{\\\"1000000\\\":\\\"un millón\\\",\\\"1000000000000\\\":\\\"un billón\\\",\\\"1000000000000000000\\\":\\\"un trillón\\\",\\\"1000000000000000000000000\\\":\\\"un cuatrillones\\\",\\\"1000000000000000000000000000000\\\":\\\"un quintillón\\\",\\\"1000000000000000000000000000000000000\\\":\\\"un sextillón\\\",\\\"1000000000000000000000000000000000000000000\\\":\\\"un septillón\\\",\\\"1000000000000000000000000000000000000000000000000\\\":\\\"un octillón\\\",\\\"1000000000000000000000000000000000000000000000000000000\\\":\\\"un nonillón\\\",\\\"1000000000000000000000000000000000000000000000000000000000000\\\":\\\"un decillón\\\",\\\"1000000000000000000000000000000000000000000000000000000000000000000\\\":\\\"un undecillón\\\",\\\"1000000000000000000000000000000000000000000000000000000000000000000000000\\\":\\\"un duodecillón\\\",\\\"1000000000000000000000000000000000000000000000000000000000000000000000000000000\\\":\\\"un tredecillón\\\",\\\"1000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\\":\\\"un cuatordecillón\\\",\\\"1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\\":\\\"un quindecillón\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"ciento\\\",\\\"useBaseInstead\\\":true,\\\"useBaseException\\\":[1]},{\\\"singular\\\":\\\"mil\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"millón\\\",\\\"plural\\\":\\\"millones\\\"},{\\\"singular\\\":\\\"billón\\\",\\\"plural\\\":\\\"billones\\\"},{\\\"singular\\\":\\\"trillón\\\",\\\"plural\\\":\\\"trillones\\\"},{\\\"singular\\\":\\\"cuatrillón\\\",\\\"plural\\\":\\\"cuatrillones\\\"},{\\\"singular\\\":\\\"quintillón\\\",\\\"plural\\\":\\\"quintillones\\\"},{\\\"singular\\\":\\\"sextillón\\\",\\\"plural\\\":\\\"sextillones\\\"},{\\\"singular\\\":\\\"septillón\\\",\\\"plural\\\":\\\"septillones\\\"},{\\\"singular\\\":\\\"octillón\\\",\\\"plural\\\":\\\"octillones\\\"},{\\\"singular\\\":\\\"nonillón\\\",\\\"plural\\\":\\\"nonillones\\\"},{\\\"singular\\\":\\\"decillón\\\",\\\"plural\\\":\\\"decillones\\\"},{\\\"singular\\\":\\\"undecillón\\\",\\\"plural\\\":\\\"undecillones\\\"},{\\\"singular\\\":\\\"duodecillón\\\",\\\"plural\\\":\\\"duodecillones\\\"},{\\\"singular\\\":\\\"tredecillón\\\",\\\"plural\\\":\\\"tredecillones\\\"},{\\\"singular\\\":\\\"cuatrodecillón\\\",\\\"plural\\\":\\\"cuatrodecillones\\\"},{\\\"singular\\\":\\\"quindecillón\\\",\\\"plural\\\":\\\"quindecillones\\\"}]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/es.json?"); + +/***/ }), -var languages = ["en", "es", "ar", "az", "pt", "fr", "eo", "it", "vi", "tr", "uk", "ru", "id"]; -var i18n = { - en: require("./i18n/en.json"), - es: require("./i18n/es.json"), - ar: require("./i18n/ar.json"), - az: require("./i18n/az.json"), - pt: require("./i18n/pt.json"), - ptPT: require("./i18n/pt-PT.json"), - fr: require("./i18n/fr.json"), - eo: require("./i18n/eo.json"), - it: require("./i18n/it.json"), - vi: require("./i18n/vi.json"), - tr: require("./i18n/tr.json"), - hu: require("./i18n/hu.json"), - enIndian: require("./i18n/en-indian.json"), - uk: require("./i18n/uk.json"), - ru: require("./i18n/ru.json"), - id: require("./i18n/id.json") -}; -exports.i18n = i18n; +/***/ "./lib/i18n/fr.json": +/*!**************************!*\ + !*** ./lib/i18n/fr.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, units, unitExceptions, default */ +/***/ (function(module) { -var shortScale = [100]; -for (var i = 1; i <= 16; i++) { - shortScale.push(Math.pow(10, i * 3)); -} +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\"-\\\",\\\"unitSeparator\\\":\\\"\\\",\\\"base\\\":{\\\"0\\\":\\\"zéro\\\",\\\"1\\\":\\\"un\\\",\\\"2\\\":\\\"deux\\\",\\\"3\\\":\\\"trois\\\",\\\"4\\\":\\\"quatre\\\",\\\"5\\\":\\\"cinq\\\",\\\"6\\\":\\\"six\\\",\\\"7\\\":\\\"sept\\\",\\\"8\\\":\\\"huit\\\",\\\"9\\\":\\\"neuf\\\",\\\"10\\\":\\\"dix\\\",\\\"11\\\":\\\"onze\\\",\\\"12\\\":\\\"douze\\\",\\\"13\\\":\\\"treize\\\",\\\"14\\\":\\\"quatorze\\\",\\\"15\\\":\\\"quinze\\\",\\\"16\\\":\\\"seize\\\",\\\"17\\\":\\\"dix-sept\\\",\\\"18\\\":\\\"dix-huit\\\",\\\"19\\\":\\\"dix-neuf\\\",\\\"20\\\":\\\"vingt\\\",\\\"30\\\":\\\"trente\\\",\\\"40\\\":\\\"quarante\\\",\\\"50\\\":\\\"cinquante\\\",\\\"60\\\":\\\"soixante\\\",\\\"70\\\":\\\"soixante-dix\\\",\\\"80\\\":\\\"quatre-vingt\\\",\\\"90\\\":\\\"quatre-vingt-dix\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"cent\\\",\\\"plural\\\":\\\"cents\\\",\\\"avoidInNumberPlural\\\":true,\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"mille\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"million\\\",\\\"plural\\\":\\\"millions\\\"},{\\\"singular\\\":\\\"milliard\\\",\\\"plural\\\":\\\"milliards\\\"},{\\\"singular\\\":\\\"billion\\\",\\\"plural\\\":\\\"billions\\\"},{\\\"singular\\\":\\\"billiard\\\",\\\"plural\\\":\\\"billiards\\\"},{\\\"singular\\\":\\\"trillion\\\",\\\"plural\\\":\\\"trillions\\\"},{\\\"singular\\\":\\\"trilliard\\\",\\\"plural\\\":\\\"trilliards\\\"},{\\\"singular\\\":\\\"quadrillion\\\",\\\"plural\\\":\\\"quadrillions\\\"},{\\\"singular\\\":\\\"quadrilliard\\\",\\\"plural\\\":\\\"quadrilliards\\\"},{\\\"singular\\\":\\\"quintillion\\\",\\\"plural\\\":\\\"quintillions\\\"},{\\\"singular\\\":\\\"quintilliard\\\",\\\"plural\\\":\\\"quintilliards\\\"},{\\\"singular\\\":\\\"sextillion\\\",\\\"plural\\\":\\\"sextillions\\\"},{\\\"singular\\\":\\\"sextilliard\\\",\\\"plural\\\":\\\"sextilliards\\\"},{\\\"singular\\\":\\\"septillion\\\",\\\"plural\\\":\\\"septillions\\\"},{\\\"singular\\\":\\\"septilliard\\\",\\\"plural\\\":\\\"septilliards\\\"},{\\\"singular\\\":\\\"octillion\\\",\\\"plural\\\":\\\"octillions\\\"}],\\\"unitExceptions\\\":{\\\"21\\\":\\\"vingt et un\\\",\\\"31\\\":\\\"trente et un\\\",\\\"41\\\":\\\"quarante et un\\\",\\\"51\\\":\\\"cinquante et un\\\",\\\"61\\\":\\\"soixante et un\\\",\\\"71\\\":\\\"soixante et onze\\\",\\\"72\\\":\\\"soixante-douze\\\",\\\"73\\\":\\\"soixante-treize\\\",\\\"74\\\":\\\"soixante-quatorze\\\",\\\"75\\\":\\\"soixante-quinze\\\",\\\"76\\\":\\\"soixante-seize\\\",\\\"77\\\":\\\"soixante-dix-sept\\\",\\\"78\\\":\\\"soixante-dix-huit\\\",\\\"79\\\":\\\"soixante-dix-neuf\\\",\\\"80\\\":\\\"quatre-vingts\\\",\\\"91\\\":\\\"quatre-vingt-onze\\\",\\\"92\\\":\\\"quatre-vingt-douze\\\",\\\"93\\\":\\\"quatre-vingt-treize\\\",\\\"94\\\":\\\"quatre-vingt-quatorze\\\",\\\"95\\\":\\\"quatre-vingt-quinze\\\",\\\"96\\\":\\\"quatre-vingt-seize\\\",\\\"97\\\":\\\"quatre-vingt-dix-sept\\\",\\\"98\\\":\\\"quatre-vingt-dix-huit\\\",\\\"99\\\":\\\"quatre-vingt-dix-neuf\\\"}}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/fr.json?"); -var longScale = [100, 1000]; -for (i = 1; i <= 15; i++) { - longScale.push(Math.pow(10, i * 6)); -} +/***/ }), -writtenNumber.defaults = { - noAnd: false, - alternativeBase: null, - lang: "en" -}; +/***/ "./lib/i18n/hu.json": +/*!**************************!*\ + !*** ./lib/i18n/hu.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, unitExceptions, units, default */ +/***/ (function(module) { -/** - * Converts numbers to their written form. - * - * @param {Number} n The number to convert - * @param {Object} [options] An object representation of the options - * @return {String} writtenN The written form of `n` - */ +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":true,\\\"baseSeparator\\\":\\\"\\\",\\\"unitSeparator\\\":\\\"és \\\",\\\"base\\\":{\\\"0\\\":\\\"nulla\\\",\\\"1\\\":\\\"egy\\\",\\\"2\\\":\\\"kettő\\\",\\\"3\\\":\\\"három\\\",\\\"4\\\":\\\"négy\\\",\\\"5\\\":\\\"öt\\\",\\\"6\\\":\\\"hat\\\",\\\"7\\\":\\\"hét\\\",\\\"8\\\":\\\"nyolc\\\",\\\"9\\\":\\\"kilenc\\\",\\\"10\\\":\\\"tíz\\\",\\\"11\\\":\\\"tizenegy\\\",\\\"12\\\":\\\"tizenkettő\\\",\\\"13\\\":\\\"tizenhárom\\\",\\\"14\\\":\\\"tizennégy\\\",\\\"15\\\":\\\"tizenöt\\\",\\\"16\\\":\\\"tizenhat\\\",\\\"17\\\":\\\"tizenhét\\\",\\\"18\\\":\\\"tizennyolc\\\",\\\"19\\\":\\\"tizenkilenc\\\",\\\"20\\\":\\\"húsz\\\",\\\"21\\\":\\\"huszonegy\\\",\\\"22\\\":\\\"huszonkettő\\\",\\\"23\\\":\\\"huszonhárom\\\",\\\"24\\\":\\\"huszonnégy\\\",\\\"25\\\":\\\"huszonöt\\\",\\\"26\\\":\\\"huszonhat\\\",\\\"27\\\":\\\"huszonhét\\\",\\\"28\\\":\\\"huszonnyolc\\\",\\\"29\\\":\\\"huszonkilenc\\\",\\\"30\\\":\\\"harminc\\\",\\\"40\\\":\\\"negyven\\\",\\\"50\\\":\\\"ötven\\\",\\\"60\\\":\\\"hatvan\\\",\\\"70\\\":\\\"hetven\\\",\\\"80\\\":\\\"nyolcvan\\\",\\\"90\\\":\\\"kilencven\\\",\\\"100\\\":\\\"száz\\\",\\\"200\\\":\\\"kétszáz\\\",\\\"300\\\":\\\"háromszáz\\\",\\\"400\\\":\\\"négyszáz\\\",\\\"500\\\":\\\"ötszáz\\\",\\\"600\\\":\\\"hatszáz\\\",\\\"700\\\":\\\"hétszáz\\\",\\\"800\\\":\\\"nyolcszáz\\\",\\\"900\\\":\\\"kilencszáz\\\",\\\"1000\\\":\\\"ezer\\\"},\\\"unitExceptions\\\":{\\\"1\\\":\\\"egy\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"száz\\\",\\\"useBaseInstead\\\":true,\\\"useBaseException\\\":[1]},{\\\"singular\\\":\\\"ezer\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"millió\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"milliárd\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"-billió\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"billiárd\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"trillió\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"trilliárd\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"kvadrillió\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"kvadrilliárd\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"kvintillió\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"kvintilliárd\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"szextillió\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"szeptillió\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"oktillió\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"nonillió\\\",\\\"avoidPrefixException\\\":[1]}]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/hu.json?"); -function writtenNumber(n, options) { - options = options || {}; - options = util.defaults(options, writtenNumber.defaults); +/***/ }), - if (n < 0) { - return ""; - } +/***/ "./lib/i18n/id.json": +/*!**************************!*\ + !*** ./lib/i18n/id.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, units, unitExceptions, default */ +/***/ (function(module) { - n = Math.round(+n); +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\" \\\",\\\"unitSeparator\\\":\\\"\\\",\\\"base\\\":{\\\"0\\\":\\\"nol\\\",\\\"1\\\":\\\"satu\\\",\\\"2\\\":\\\"dua\\\",\\\"3\\\":\\\"tiga\\\",\\\"4\\\":\\\"empat\\\",\\\"5\\\":\\\"lima\\\",\\\"6\\\":\\\"enam\\\",\\\"7\\\":\\\"tujuh\\\",\\\"8\\\":\\\"delapan\\\",\\\"9\\\":\\\"sembilan\\\",\\\"10\\\":\\\"sepuluh\\\",\\\"11\\\":\\\"sebelas\\\",\\\"12\\\":\\\"dua belas\\\",\\\"13\\\":\\\"tiga belas\\\",\\\"14\\\":\\\"empat belas\\\",\\\"15\\\":\\\"lima belas\\\",\\\"16\\\":\\\"enam belas\\\",\\\"17\\\":\\\"tujuh belas\\\",\\\"18\\\":\\\"delapan belas\\\",\\\"19\\\":\\\"sembilan belas\\\",\\\"20\\\":\\\"dua puluh\\\",\\\"30\\\":\\\"tiga puluh\\\",\\\"40\\\":\\\"empat puluh\\\",\\\"50\\\":\\\"lima puluh\\\",\\\"60\\\":\\\"enam puluh\\\",\\\"70\\\":\\\"tujuh puluh\\\",\\\"80\\\":\\\"delapan puluh\\\",\\\"90\\\":\\\"sembilan puluh\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"seratus\\\",\\\"plural\\\":\\\"ratus\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"seribu\\\",\\\"plural\\\":\\\"ribu\\\",\\\"avoidPrefixException\\\":[1]},\\\"juta\\\",\\\"miliar\\\",\\\"triliun\\\",\\\"kuadiliun\\\"],\\\"unitExceptions\\\":[]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/id.json?"); - var language = typeof options.lang === "string" - ? i18n[options.lang] - : options.lang; +/***/ }), - if (!language) { - if (languages.indexOf(writtenNumber.defaults.lang) < 0) { - writtenNumber.defaults.lang = "en"; - } +/***/ "./lib/i18n/it.json": +/*!**************************!*\ + !*** ./lib/i18n/it.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, generalSeparator, wordSeparator, base, unitExceptions, units, default */ +/***/ (function(module) { - language = i18n[writtenNumber.defaults.lang]; - } - - var scale = language.useLongScale ? longScale : shortScale; - var units = language.units; - var unit; +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\"\\\",\\\"unitSeparator\\\":\\\"\\\",\\\"generalSeparator\\\":\\\"\\\",\\\"wordSeparator\\\":\\\"\\\",\\\"base\\\":{\\\"0\\\":\\\"zero\\\",\\\"1\\\":\\\"uno\\\",\\\"2\\\":\\\"due\\\",\\\"3\\\":\\\"tre\\\",\\\"4\\\":\\\"quattro\\\",\\\"5\\\":\\\"cinque\\\",\\\"6\\\":\\\"sei\\\",\\\"7\\\":\\\"sette\\\",\\\"8\\\":\\\"otto\\\",\\\"9\\\":\\\"nove\\\",\\\"10\\\":\\\"dieci\\\",\\\"11\\\":\\\"undici\\\",\\\"12\\\":\\\"dodici\\\",\\\"13\\\":\\\"tredici\\\",\\\"14\\\":\\\"quattordici\\\",\\\"15\\\":\\\"quindici\\\",\\\"16\\\":\\\"sedici\\\",\\\"17\\\":\\\"diciassette\\\",\\\"18\\\":\\\"diciotto\\\",\\\"19\\\":\\\"diciannove\\\",\\\"20\\\":\\\"venti\\\",\\\"21\\\":\\\"ventuno\\\",\\\"23\\\":\\\"ventitré\\\",\\\"28\\\":\\\"ventotto\\\",\\\"30\\\":\\\"trenta\\\",\\\"31\\\":\\\"trentuno\\\",\\\"33\\\":\\\"trentatré\\\",\\\"38\\\":\\\"trentotto\\\",\\\"40\\\":\\\"quaranta\\\",\\\"41\\\":\\\"quarantuno\\\",\\\"43\\\":\\\"quaranta­tré\\\",\\\"48\\\":\\\"quarantotto\\\",\\\"50\\\":\\\"cinquanta\\\",\\\"51\\\":\\\"cinquantuno\\\",\\\"53\\\":\\\"cinquantatré\\\",\\\"58\\\":\\\"cinquantotto\\\",\\\"60\\\":\\\"sessanta\\\",\\\"61\\\":\\\"sessantuno\\\",\\\"63\\\":\\\"sessanta­tré\\\",\\\"68\\\":\\\"sessantotto\\\",\\\"70\\\":\\\"settanta\\\",\\\"71\\\":\\\"settantuno\\\",\\\"73\\\":\\\"settantatré\\\",\\\"78\\\":\\\"settantotto\\\",\\\"80\\\":\\\"ottanta\\\",\\\"81\\\":\\\"ottantuno\\\",\\\"83\\\":\\\"ottantatré\\\",\\\"88\\\":\\\"ottantotto\\\",\\\"90\\\":\\\"novanta\\\",\\\"91\\\":\\\"novantuno\\\",\\\"93\\\":\\\"novantatré\\\",\\\"98\\\":\\\"novantotto\\\",\\\"100\\\":\\\"cento\\\",\\\"101\\\":\\\"centuno\\\",\\\"108\\\":\\\"centootto\\\",\\\"180\\\":\\\"centottanta\\\",\\\"201\\\":\\\"duecentuno\\\",\\\"301\\\":\\\"tre­cent­uno\\\",\\\"401\\\":\\\"quattro­cent­uno\\\",\\\"501\\\":\\\"cinque­cent­uno\\\",\\\"601\\\":\\\"sei­cent­uno\\\",\\\"701\\\":\\\"sette­cent­uno\\\",\\\"801\\\":\\\"otto­cent­uno\\\",\\\"901\\\":\\\"nove­cent­uno\\\"},\\\"unitExceptions\\\":{\\\"1\\\":\\\"un\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"cento\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"mille\\\",\\\"plural\\\":\\\"mila\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"milione\\\",\\\"plural\\\":\\\"milioni\\\"},{\\\"singular\\\":\\\"miliardo\\\",\\\"plural\\\":\\\"miliardi\\\"},{\\\"singular\\\":\\\"bilione\\\",\\\"plural\\\":\\\"bilioni\\\"},{\\\"singular\\\":\\\"biliardo\\\",\\\"plural\\\":\\\"biliardi\\\"},{\\\"singular\\\":\\\"trilione\\\",\\\"plural\\\":\\\"trilioni\\\"},{\\\"singular\\\":\\\"triliardo\\\",\\\"plural\\\":\\\"triliardi\\\"},{\\\"singular\\\":\\\"quadrilione\\\",\\\"plural\\\":\\\"quadrilioni\\\"},{\\\"singular\\\":\\\"quadriliardo\\\",\\\"plural\\\":\\\"quadriliardi\\\"}]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/it.json?"); - if (!(units instanceof Array)) { - var rawUnits = units; +/***/ }), - units = []; - scale = Object.keys(rawUnits); +/***/ "./lib/i18n/pt-PT.json": +/*!*****************************!*\ + !*** ./lib/i18n/pt-PT.json ***! + \*****************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, andWhenTrailing, base, unitExceptions, units, default */ +/***/ (function(module) { - for (var i in scale) { - units.push(rawUnits[scale[i]]); - scale[i] = Math.pow(10, parseInt(scale[i])); - } - } +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":true,\\\"baseSeparator\\\":\\\" e \\\",\\\"unitSeparator\\\":\\\"e \\\",\\\"andWhenTrailing\\\":true,\\\"base\\\":{\\\"0\\\":\\\"zero\\\",\\\"1\\\":\\\"um\\\",\\\"2\\\":\\\"dois\\\",\\\"3\\\":\\\"três\\\",\\\"4\\\":\\\"quatro\\\",\\\"5\\\":\\\"cinco\\\",\\\"6\\\":\\\"seis\\\",\\\"7\\\":\\\"sete\\\",\\\"8\\\":\\\"oito\\\",\\\"9\\\":\\\"nove\\\",\\\"10\\\":\\\"dez\\\",\\\"11\\\":\\\"onze\\\",\\\"12\\\":\\\"doze\\\",\\\"13\\\":\\\"treze\\\",\\\"14\\\":\\\"catorze\\\",\\\"15\\\":\\\"quinze\\\",\\\"16\\\":\\\"dezasseis\\\",\\\"17\\\":\\\"dezassete\\\",\\\"18\\\":\\\"dezoito\\\",\\\"19\\\":\\\"dezanove\\\",\\\"20\\\":\\\"vinte\\\",\\\"30\\\":\\\"trinta\\\",\\\"40\\\":\\\"quarenta\\\",\\\"50\\\":\\\"cinquenta\\\",\\\"60\\\":\\\"sessenta\\\",\\\"70\\\":\\\"setenta\\\",\\\"80\\\":\\\"oitenta\\\",\\\"90\\\":\\\"noventa\\\",\\\"100\\\":\\\"cem\\\",\\\"200\\\":\\\"duzentos\\\",\\\"300\\\":\\\"trezentos\\\",\\\"400\\\":\\\"quatrocentos\\\",\\\"500\\\":\\\"quinhentos\\\",\\\"600\\\":\\\"seiscentos\\\",\\\"700\\\":\\\"setecentos\\\",\\\"800\\\":\\\"oitocentos\\\",\\\"900\\\":\\\"novecentos\\\",\\\"1000\\\":\\\"mil\\\"},\\\"unitExceptions\\\":{\\\"1\\\":\\\"um\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"cento\\\",\\\"useBaseInstead\\\":true,\\\"useBaseException\\\":[1],\\\"useBaseExceptionWhenNoTrailingNumbers\\\":true,\\\"andException\\\":true},{\\\"singular\\\":\\\"mil\\\",\\\"avoidPrefixException\\\":[1],\\\"andException\\\":true},{\\\"singular\\\":\\\"milhão\\\",\\\"plural\\\":\\\"milhões\\\"},{\\\"singular\\\":\\\"bilião\\\",\\\"plural\\\":\\\"biliões\\\"},{\\\"singular\\\":\\\"trilião\\\",\\\"plural\\\":\\\"triliões\\\"},{\\\"singular\\\":\\\"quadrilião\\\",\\\"plural\\\":\\\"quadriliões\\\"},{\\\"singular\\\":\\\"quintilião\\\",\\\"plural\\\":\\\"quintiliões\\\"},{\\\"singular\\\":\\\"sextilião\\\",\\\"plural\\\":\\\"sextiliões\\\"},{\\\"singular\\\":\\\"septilião\\\",\\\"plural\\\":\\\"septiliões\\\"},{\\\"singular\\\":\\\"octilião\\\",\\\"plural\\\":\\\"octiliões\\\"},{\\\"singular\\\":\\\"nonilião\\\",\\\"plural\\\":\\\"noniliões\\\"},{\\\"singular\\\":\\\"decilião\\\",\\\"plural\\\":\\\"deciliões\\\"}]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/pt-PT.json?"); - var baseCardinals = language.base; - var alternativeBaseCardinals = options.alternativeBase - ? language.alternativeBase[options.alternativeBase] - : {}; +/***/ }), - if (language.unitExceptions[n]) return language.unitExceptions[n]; - if (alternativeBaseCardinals[n]) return alternativeBaseCardinals[n]; - if (baseCardinals[n]) return baseCardinals[n]; - if (n < 100) - return handleSmallerThan100(n, language, unit, baseCardinals, alternativeBaseCardinals, options); +/***/ "./lib/i18n/pt.json": +/*!**************************!*\ + !*** ./lib/i18n/pt.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, andWhenTrailing, base, unitExceptions, units, default */ +/***/ (function(module) { - var m = n % 100; - var ret = []; +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\" e \\\",\\\"unitSeparator\\\":\\\"e \\\",\\\"andWhenTrailing\\\":true,\\\"base\\\":{\\\"0\\\":\\\"zero\\\",\\\"1\\\":\\\"um\\\",\\\"2\\\":\\\"dois\\\",\\\"3\\\":\\\"três\\\",\\\"4\\\":\\\"quatro\\\",\\\"5\\\":\\\"cinco\\\",\\\"6\\\":\\\"seis\\\",\\\"7\\\":\\\"sete\\\",\\\"8\\\":\\\"oito\\\",\\\"9\\\":\\\"nove\\\",\\\"10\\\":\\\"dez\\\",\\\"11\\\":\\\"onze\\\",\\\"12\\\":\\\"doze\\\",\\\"13\\\":\\\"treze\\\",\\\"14\\\":\\\"catorze\\\",\\\"15\\\":\\\"quinze\\\",\\\"16\\\":\\\"dezesseis\\\",\\\"17\\\":\\\"dezessete\\\",\\\"18\\\":\\\"dezoito\\\",\\\"19\\\":\\\"dezenove\\\",\\\"20\\\":\\\"vinte\\\",\\\"30\\\":\\\"trinta\\\",\\\"40\\\":\\\"quarenta\\\",\\\"50\\\":\\\"cinquenta\\\",\\\"60\\\":\\\"sessenta\\\",\\\"70\\\":\\\"setenta\\\",\\\"80\\\":\\\"oitenta\\\",\\\"90\\\":\\\"noventa\\\",\\\"100\\\":\\\"cem\\\",\\\"200\\\":\\\"duzentos\\\",\\\"300\\\":\\\"trezentos\\\",\\\"400\\\":\\\"quatrocentos\\\",\\\"500\\\":\\\"quinhentos\\\",\\\"600\\\":\\\"seiscentos\\\",\\\"700\\\":\\\"setecentos\\\",\\\"800\\\":\\\"oitocentos\\\",\\\"900\\\":\\\"novecentos\\\",\\\"1000\\\":\\\"mil\\\"},\\\"unitExceptions\\\":{\\\"1\\\":\\\"um\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"cento\\\",\\\"useBaseInstead\\\":true,\\\"useBaseException\\\":[1],\\\"useBaseExceptionWhenNoTrailingNumbers\\\":true,\\\"andException\\\":true},{\\\"singular\\\":\\\"mil\\\",\\\"avoidPrefixException\\\":[1],\\\"andException\\\":true},{\\\"singular\\\":\\\"milhão\\\",\\\"plural\\\":\\\"milhões\\\"},{\\\"singular\\\":\\\"bilhão\\\",\\\"plural\\\":\\\"bilhões\\\"},{\\\"singular\\\":\\\"trilhão\\\",\\\"plural\\\":\\\"trilhões\\\"},{\\\"singular\\\":\\\"quadrilhão\\\",\\\"plural\\\":\\\"quadrilhão\\\"},{\\\"singular\\\":\\\"quintilhão\\\",\\\"plural\\\":\\\"quintilhões\\\"},{\\\"singular\\\":\\\"sextilhão\\\",\\\"plural\\\":\\\"sextilhões\\\"},{\\\"singular\\\":\\\"septilhão\\\",\\\"plural\\\":\\\"septilhões\\\"},{\\\"singular\\\":\\\"octilhão\\\",\\\"plural\\\":\\\"octilhões\\\"},{\\\"singular\\\":\\\"nonilhão\\\",\\\"plural\\\":\\\"nonilhões\\\"},{\\\"singular\\\":\\\"decilhão\\\",\\\"plural\\\":\\\"decilhões\\\"},{\\\"singular\\\":\\\"undecilhão\\\",\\\"plural\\\":\\\"undecilhões\\\"},{\\\"singular\\\":\\\"doudecilhão\\\",\\\"plural\\\":\\\"doudecilhões\\\"},{\\\"singular\\\":\\\"tredecilhão\\\",\\\"plural\\\":\\\"tredecilhões\\\"}]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/pt.json?"); - if (m) { - if ( - options.noAnd && - !(language.andException && language.andException[10]) - ) { - ret.push(writtenNumber(m, options)); - } else { - ret.push(language.unitSeparator + writtenNumber(m, options)); - } - } +/***/ }), - var firstSignificant; +/***/ "./lib/i18n/ru.json": +/*!**************************!*\ + !*** ./lib/i18n/ru.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, alternativeBase, units, unitExceptions, default */ +/***/ (function(module) { - for (var i = 0, len = units.length; i < len; i++) { - var r = Math.floor(n / scale[i]); - var divideBy; +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\" \\\",\\\"unitSeparator\\\":\\\"\\\",\\\"base\\\":{\\\"0\\\":\\\"ноль\\\",\\\"1\\\":\\\"один\\\",\\\"2\\\":\\\"два\\\",\\\"3\\\":\\\"три\\\",\\\"4\\\":\\\"четыре\\\",\\\"5\\\":\\\"пять\\\",\\\"6\\\":\\\"шесть\\\",\\\"7\\\":\\\"семь\\\",\\\"8\\\":\\\"восемь\\\",\\\"9\\\":\\\"девять\\\",\\\"10\\\":\\\"десять\\\",\\\"11\\\":\\\"одинадцать\\\",\\\"12\\\":\\\"двенадцать\\\",\\\"13\\\":\\\"тринадцать\\\",\\\"14\\\":\\\"четырнадцать\\\",\\\"15\\\":\\\"пятнадцать\\\",\\\"16\\\":\\\"шестнадцать\\\",\\\"17\\\":\\\"семнадцать\\\",\\\"18\\\":\\\"восемнадцать\\\",\\\"19\\\":\\\"девятнадцать\\\",\\\"20\\\":\\\"двадцать\\\",\\\"30\\\":\\\"тридцать\\\",\\\"40\\\":\\\"сорок\\\",\\\"50\\\":\\\"пятьдесят\\\",\\\"60\\\":\\\"шестьдесят\\\",\\\"70\\\":\\\"семьдесят\\\",\\\"80\\\":\\\"восемьдесят\\\",\\\"90\\\":\\\"девяносто\\\",\\\"100\\\":\\\"сто\\\",\\\"200\\\":\\\"двести\\\",\\\"300\\\":\\\"триста\\\",\\\"400\\\":\\\"четыреста\\\",\\\"500\\\":\\\"пятьсот\\\",\\\"600\\\":\\\"шестьсот\\\",\\\"700\\\":\\\"семьсот\\\",\\\"800\\\":\\\"восемьсот\\\",\\\"900\\\":\\\"девятьсот\\\"},\\\"alternativeBase\\\":{\\\"feminine\\\":{\\\"1\\\":\\\"одна\\\",\\\"2\\\":\\\"две\\\"}},\\\"units\\\":[{\\\"useBaseInstead\\\":true,\\\"useBaseException\\\":[]},{\\\"singular\\\":\\\"тысяча\\\",\\\"few\\\":\\\"тысячи\\\",\\\"plural\\\":\\\"тысяч\\\",\\\"useAlternativeBase\\\":\\\"feminine\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"миллион\\\",\\\"few\\\":\\\"миллиона\\\",\\\"plural\\\":\\\"миллионов\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"миллиард\\\",\\\"few\\\":\\\"миллиарда\\\",\\\"plural\\\":\\\"миллиардов\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"триллион\\\",\\\"few\\\":\\\"триллиона\\\",\\\"plural\\\":\\\"триллионов\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"квадрильон\\\",\\\"few\\\":\\\"квадриллион\\\",\\\"plural\\\":\\\"квадрилон\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"квинтиллион\\\",\\\"few\\\":\\\"квинтиллиона\\\",\\\"plural\\\":\\\"квинтильонов\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"секстиллионов\\\",\\\"few\\\":\\\"секстильона\\\",\\\"plural\\\":\\\"секстиллионов\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"септиллион\\\",\\\"few\\\":\\\"септиллиона\\\",\\\"plural\\\":\\\"септиллионов\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"октиллион\\\",\\\"few\\\":\\\"октиллиона\\\",\\\"plural\\\":\\\"октиллионов\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"нониллион\\\",\\\"few\\\":\\\"нониллиона\\\",\\\"plural\\\":\\\"нониллионов\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"дециллион\\\",\\\"few\\\":\\\"дециллиона\\\",\\\"plural\\\":\\\"дециллионов\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"ундециллион\\\",\\\"few\\\":\\\"ундециллиона\\\",\\\"plural\\\":\\\"ундециллионив\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"дуодециллион\\\",\\\"few\\\":\\\"дуодециллиона\\\",\\\"plural\\\":\\\"дуодециллионив\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"тредециллион\\\",\\\"few\\\":\\\"тредециллиона\\\",\\\"plural\\\":\\\"тредециллионив\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"кватуордециллион\\\",\\\"few\\\":\\\"кватуордециллиона\\\",\\\"plural\\\":\\\"кватуордециллионив\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"квиндециллион\\\",\\\"few\\\":\\\"квиндециллиона\\\",\\\"plural\\\":\\\"квиндециллионив\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]}],\\\"unitExceptions\\\":[]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/ru.json?"); - if (i === len - 1) divideBy = 1000000; - else divideBy = scale[i + 1] / scale[i]; +/***/ }), - r %= divideBy; +/***/ "./lib/i18n/tr.json": +/*!**************************!*\ + !*** ./lib/i18n/tr.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, units, unitExceptions, default */ +/***/ (function(module) { - unit = units[i]; +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\" \\\",\\\"unitSeparator\\\":\\\"\\\",\\\"base\\\":{\\\"0\\\":\\\"sıfır\\\",\\\"1\\\":\\\"bir\\\",\\\"2\\\":\\\"iki\\\",\\\"3\\\":\\\"üç\\\",\\\"4\\\":\\\"dört\\\",\\\"5\\\":\\\"beş\\\",\\\"6\\\":\\\"altı\\\",\\\"7\\\":\\\"yedi\\\",\\\"8\\\":\\\"sekiz\\\",\\\"9\\\":\\\"dokuz\\\",\\\"10\\\":\\\"on\\\",\\\"20\\\":\\\"yirmi\\\",\\\"30\\\":\\\"otuz\\\",\\\"40\\\":\\\"kırk\\\",\\\"50\\\":\\\"elli\\\",\\\"60\\\":\\\"altmış\\\",\\\"70\\\":\\\"yetmiş\\\",\\\"80\\\":\\\"seksen\\\",\\\"90\\\":\\\"doksan\\\"},\\\"units\\\":[{\\\"singular\\\":\\\"yüz\\\",\\\"avoidPrefixException\\\":[1]},{\\\"singular\\\":\\\"bin\\\",\\\"avoidPrefixException\\\":[1]},\\\"milyon\\\",\\\"milyar\\\",\\\"trilyon\\\",\\\"katrilyon\\\",\\\"kentilyon\\\",\\\"sekstilyon\\\",\\\"septilyon\\\",\\\"oktilyon\\\",\\\"nonilyon\\\",\\\"desilyon\\\",\\\"andesilyon\\\",\\\"dodesilyon\\\",\\\"tredesilyon\\\",\\\"katordesilyon\\\",\\\"kendesilyon\\\"],\\\"unitExceptions\\\":[]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/tr.json?"); - if (!r) continue; - firstSignificant = scale[i]; +/***/ }), - if (unit.useBaseInstead) { - var shouldUseBaseException = - unit.useBaseException.indexOf(r) > -1 && - (unit.useBaseExceptionWhenNoTrailingNumbers - ? i === 0 && ret.length - : true); - if (!shouldUseBaseException) { - ret.push(alternativeBaseCardinals[r * scale[i]] || baseCardinals[r * scale[i]]); - } else { - ret.push(r > 1 && unit.plural ? unit.plural : unit.singular); - } - continue; - } +/***/ "./lib/i18n/uk.json": +/*!**************************!*\ + !*** ./lib/i18n/uk.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, alternativeBase, units, unitExceptions, default */ +/***/ (function(module) { - var str; - if (typeof unit === "string") { - str = unit; - } else if (r === 1 || unit.useSingularEnding && r % 10 === 1 - && (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0)) { - str = unit.singular; - } else if (unit.few && (r > 1 && r < 5 || unit.useFewEnding && r % 10 > 1 && r % 10 < 5 - && (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0))) { - str = unit.few; - } else { - str = unit.plural && (!unit.avoidInNumberPlural || !m) - ? unit.plural - : unit.singular; - - // Languages with dual - str = (r === 2 && unit.dual) ? unit.dual : str; - - // "restrictedPlural" : use plural only for 3 to 10 - str = (r > 10 && unit.restrictedPlural) ? unit.singular : str; - } +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\" \\\",\\\"unitSeparator\\\":\\\"\\\",\\\"base\\\":{\\\"0\\\":\\\"нуль\\\",\\\"1\\\":\\\"один\\\",\\\"2\\\":\\\"два\\\",\\\"3\\\":\\\"три\\\",\\\"4\\\":\\\"чотири\\\",\\\"5\\\":\\\"п’ять\\\",\\\"6\\\":\\\"шість\\\",\\\"7\\\":\\\"сім\\\",\\\"8\\\":\\\"вісім\\\",\\\"9\\\":\\\"дев’ять\\\",\\\"10\\\":\\\"десять\\\",\\\"11\\\":\\\"одинадцять\\\",\\\"12\\\":\\\"дванадцять\\\",\\\"13\\\":\\\"тринадцять\\\",\\\"14\\\":\\\"чотирнадцять\\\",\\\"15\\\":\\\"п’ятнадцять\\\",\\\"16\\\":\\\"шістнадцять\\\",\\\"17\\\":\\\"сімнадцять\\\",\\\"18\\\":\\\"вісімнадцять\\\",\\\"19\\\":\\\"дев’ятнадцять\\\",\\\"20\\\":\\\"двадцять\\\",\\\"30\\\":\\\"тридцять\\\",\\\"40\\\":\\\"сорок\\\",\\\"50\\\":\\\"п’ятдесят\\\",\\\"60\\\":\\\"шістдесят\\\",\\\"70\\\":\\\"сімдесят\\\",\\\"80\\\":\\\"вісімдесят\\\",\\\"90\\\":\\\"дев’яносто\\\",\\\"100\\\":\\\"сто\\\",\\\"200\\\":\\\"двісті\\\",\\\"300\\\":\\\"триста\\\",\\\"400\\\":\\\"чотириста\\\",\\\"500\\\":\\\"п’ятсот\\\",\\\"600\\\":\\\"шістсот\\\",\\\"700\\\":\\\"сімсот\\\",\\\"800\\\":\\\"вісімсот\\\",\\\"900\\\":\\\"дев’ятсот\\\"},\\\"alternativeBase\\\":{\\\"feminine\\\":{\\\"1\\\":\\\"одна\\\",\\\"2\\\":\\\"дві\\\"}},\\\"units\\\":[{\\\"useBaseInstead\\\":true,\\\"useBaseException\\\":[]},{\\\"singular\\\":\\\"тисяча\\\",\\\"few\\\":\\\"тисячі\\\",\\\"plural\\\":\\\"тисяч\\\",\\\"useAlternativeBase\\\":\\\"feminine\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"мільйон\\\",\\\"few\\\":\\\"мільйони\\\",\\\"plural\\\":\\\"мільйонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"мільярд\\\",\\\"few\\\":\\\"мільярди\\\",\\\"plural\\\":\\\"мільярдів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"трильйон\\\",\\\"few\\\":\\\"трильйони\\\",\\\"plural\\\":\\\"трильйонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"квадрильйон\\\",\\\"few\\\":\\\"квадрильйони\\\",\\\"plural\\\":\\\"квадрильйонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"квінтильйон\\\",\\\"few\\\":\\\"квінтильйони\\\",\\\"plural\\\":\\\"квінтильйонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"секстильйон\\\",\\\"few\\\":\\\"секстильйони\\\",\\\"plural\\\":\\\"секстильйонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"септілліон\\\",\\\"few\\\":\\\"септілліони\\\",\\\"plural\\\":\\\"септілліонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"октілліон\\\",\\\"few\\\":\\\"октілліони\\\",\\\"plural\\\":\\\"октілліонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"нонілліон\\\",\\\"few\\\":\\\"нонілліони\\\",\\\"plural\\\":\\\"нонілліонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"децілліон\\\",\\\"few\\\":\\\"децілліони\\\",\\\"plural\\\":\\\"децілліонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"ундецілліон\\\",\\\"few\\\":\\\"ундецілліони\\\",\\\"plural\\\":\\\"ундецілліонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"дуодецілліон\\\",\\\"few\\\":\\\"дуодецілліони\\\",\\\"plural\\\":\\\"дуодецілліонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"тредецілліон\\\",\\\"few\\\":\\\"тредецілліони\\\",\\\"plural\\\":\\\"тредецілліонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"кватуордецілліон\\\",\\\"few\\\":\\\"кватуордецілліони\\\",\\\"plural\\\":\\\"кватуордецілліонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]},{\\\"singular\\\":\\\"квіндецілліон\\\",\\\"few\\\":\\\"квіндецілліони\\\",\\\"plural\\\":\\\"квіндецілліонів\\\",\\\"useSingularEnding\\\":true,\\\"useFewEnding\\\":true,\\\"avoidEndingRules\\\":[11,12,13,14,111,112,113,114,211,212,213,214,311,312,313,314,411,412,413,414,511,512,513,514,611,612,613,614,711,712,713,714,811,812,813,814,911,912,913,914]}],\\\"unitExceptions\\\":[]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/uk.json?"); - if ( - unit.avoidPrefixException && - unit.avoidPrefixException.indexOf(r) > -1 - ) { - ret.push(str); - continue; - } +/***/ }), - var exception = language.unitExceptions[r]; - var number = - exception || - writtenNumber( - r, - util.defaults( - { - // Languages with and exceptions need to set `noAnd` to false - noAnd: !((language.andException && language.andException[r]) || - unit.andException) && true, - alternativeBase: unit.useAlternativeBase - }, - options - ) - ); - n -= r * scale[i]; - ret.push(number + " " + str); - } +/***/ "./lib/i18n/vi.json": +/*!**************************!*\ + !*** ./lib/i18n/vi.json ***! + \**************************/ +/*! exports provided: useLongScale, baseSeparator, unitSeparator, base, units, unitExceptions, default */ +/***/ (function(module) { - var firstSignificantN = firstSignificant * Math.floor(n / firstSignificant); - var rest = n - firstSignificantN; +eval("module.exports = JSON.parse(\"{\\\"useLongScale\\\":false,\\\"baseSeparator\\\":\\\" \\\",\\\"unitSeparator\\\":\\\"và \\\",\\\"base\\\":{\\\"0\\\":\\\"không\\\",\\\"1\\\":\\\"một\\\",\\\"2\\\":\\\"hai\\\",\\\"3\\\":\\\"ba\\\",\\\"4\\\":\\\"bốn\\\",\\\"5\\\":\\\"năm\\\",\\\"6\\\":\\\"sáu\\\",\\\"7\\\":\\\"bảy\\\",\\\"8\\\":\\\"tám\\\",\\\"9\\\":\\\"chín\\\",\\\"10\\\":\\\"mười\\\",\\\"15\\\":\\\"mười lăm\\\",\\\"20\\\":\\\"hai mươi\\\",\\\"21\\\":\\\"hai mươi mốt\\\",\\\"25\\\":\\\"hai mươi lăm\\\",\\\"30\\\":\\\"ba mươi\\\",\\\"31\\\":\\\"ba mươi mốt\\\",\\\"40\\\":\\\"bốn mươi\\\",\\\"41\\\":\\\"bốn mươi mốt\\\",\\\"45\\\":\\\"bốn mươi lăm\\\",\\\"50\\\":\\\"năm mươi\\\",\\\"51\\\":\\\"năm mươi mốt\\\",\\\"55\\\":\\\"năm mươi lăm\\\",\\\"60\\\":\\\"sáu mươi\\\",\\\"61\\\":\\\"sáu mươi mốt\\\",\\\"65\\\":\\\"sáu mươi lăm\\\",\\\"70\\\":\\\"bảy mươi\\\",\\\"71\\\":\\\"bảy mươi mốt\\\",\\\"75\\\":\\\"bảy mươi lăm\\\",\\\"80\\\":\\\"tám mươi\\\",\\\"81\\\":\\\"tám mươi mốt\\\",\\\"85\\\":\\\"tám mươi lăm\\\",\\\"90\\\":\\\"chín mươi\\\",\\\"91\\\":\\\"chín mươi mốt\\\",\\\"95\\\":\\\"chín mươi lăm\\\"},\\\"units\\\":[\\\"trăm\\\",\\\"ngàn\\\",\\\"triệu\\\",\\\"tỷ\\\",\\\"nghìn tỷ\\\"],\\\"unitExceptions\\\":[]}\");\n\n//# sourceURL=webpack://writtenNumber/./lib/i18n/vi.json?"); + +/***/ }), + +/***/ "./lib/index.js": +/*!**********************!*\ + !*** ./lib/index.js ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports = module.exports = facade;\nvar util = __webpack_require__(/*! ./util */ \"./lib/util.js\");\nvar writtenNumber = __webpack_require__(/*! ./core */ \"./lib/core.js\");\n\nvar languages = [\n \"en\",\n \"es\",\n \"ar\",\n \"az\",\n \"pt\",\n \"fr\",\n \"eo\",\n \"it\",\n \"vi\",\n \"tr\",\n \"uk\",\n \"ru\",\n \"id\"\n];\nvar i18n = {\n en: __webpack_require__(/*! ./i18n/en.json */ \"./lib/i18n/en.json\"),\n es: __webpack_require__(/*! ./i18n/es.json */ \"./lib/i18n/es.json\"),\n ar: __webpack_require__(/*! ./i18n/ar.json */ \"./lib/i18n/ar.json\"),\n az: __webpack_require__(/*! ./i18n/az.json */ \"./lib/i18n/az.json\"),\n pt: __webpack_require__(/*! ./i18n/pt.json */ \"./lib/i18n/pt.json\"),\n ptPT: __webpack_require__(/*! ./i18n/pt-PT.json */ \"./lib/i18n/pt-PT.json\"),\n fr: __webpack_require__(/*! ./i18n/fr.json */ \"./lib/i18n/fr.json\"),\n eo: __webpack_require__(/*! ./i18n/eo.json */ \"./lib/i18n/eo.json\"),\n it: __webpack_require__(/*! ./i18n/it.json */ \"./lib/i18n/it.json\"),\n vi: __webpack_require__(/*! ./i18n/vi.json */ \"./lib/i18n/vi.json\"),\n tr: __webpack_require__(/*! ./i18n/tr.json */ \"./lib/i18n/tr.json\"),\n hu: __webpack_require__(/*! ./i18n/hu.json */ \"./lib/i18n/hu.json\"),\n enIndian: __webpack_require__(/*! ./i18n/en-indian.json */ \"./lib/i18n/en-indian.json\"),\n uk: __webpack_require__(/*! ./i18n/uk.json */ \"./lib/i18n/uk.json\"),\n ru: __webpack_require__(/*! ./i18n/ru.json */ \"./lib/i18n/ru.json\"),\n id: __webpack_require__(/*! ./i18n/id.json */ \"./lib/i18n/id.json\")\n};\nexports.i18n = i18n;\n\nfacade.defaults = {\n noAnd: false,\n alternativeBase: null,\n lang: \"en\"\n};\n\n/**\n * Converts numbers to their written form.\n *\n * @param {Number} n The number to convert\n * @param {Object} [options] An object representation of the options\n * @return {String} writtenN The written form of `n`\n */\n\nfunction facade(n, options) {\n options = options || {};\n options = util.defaults(options, facade.defaults);\n\n var language =\n typeof options.lang === \"string\" ? i18n[options.lang] : options.lang;\n\n if (!language) {\n if (languages.indexOf(facade.defaults.lang) < 0) {\n facade.defaults.lang = \"en\";\n }\n\n language = i18n[facade.defaults.lang];\n }\n options.lang = language;\n return writtenNumber(n, options);\n}\n\n\n//# sourceURL=webpack://writtenNumber/./lib/index.js?"); - if ( - language.andWhenTrailing && - firstSignificant && - 0 < rest && - ret[0].indexOf(language.unitSeparator) !== 0 - ) { - ret = [ret[0], language.unitSeparator.replace(/\s+$/, "")].concat( - ret.slice(1) - ); - } - - // Languages that have separators for all cardinals. - if (language.allSeparator) { - for (var j = 0; j < ret.length-1; j++) { - ret[j] = language.allSeparator + ret[j]; - } - } - var result = ret.reverse().join(" "); - return result; -} +/***/ }), -function handleSmallerThan100(n, language, unit, baseCardinals, alternativeBaseCardinals, options) { - var dec = Math.floor(n / 10) * 10; - unit = n - dec; - if (unit) { - return ( - alternativeBaseCardinals[dec] || baseCardinals[dec] + language.baseSeparator + writtenNumber(unit, options) - ); - } - return alternativeBaseCardinals[dec] || baseCardinals[dec]; -} +/***/ "./lib/util.js": +/*!*********************!*\ + !*** ./lib/util.js ***! + \*********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -},{"./i18n/ar.json":1,"./i18n/az.json":2,"./i18n/en-indian.json":3,"./i18n/en.json":4,"./i18n/eo.json":5,"./i18n/es.json":6,"./i18n/fr.json":7,"./i18n/hu.json":8,"./i18n/id.json":9,"./i18n/it.json":10,"./i18n/pt-PT.json":11,"./i18n/pt.json":12,"./i18n/ru.json":13,"./i18n/tr.json":14,"./i18n/uk.json":15,"./i18n/vi.json":16,"./util":18}],18:[function(require,module,exports){ "use strict"; -/** - * Merges a set of default keys with a target object - * (Like _.defaults, but will also extend onto null/undefined) - * - * @param {Object} [target] The object to extend - * @param {Object} defaults The object to default to - * @return {Object} extendedTarget - */ +eval("\n/**\n * Merges a set of default keys with a target object\n * (Like _.defaults, but will also extend onto null/undefined)\n *\n * @param {Object} [target] The object to extend\n * @param {Object} defaults The object to default to\n * @return {Object} extendedTarget\n */\n\nfunction defaults(target, defs) {\n if (target == null) target = {};\n var ret = {};\n var keys = Object.keys(defs);\n for (var i = 0, len = keys.length; i < len; i++) {\n var key = keys[i];\n ret[key] = target[key] || defs[key];\n }\n return ret;\n}\nexports.defaults = defaults;\n\n\n//# sourceURL=webpack://writtenNumber/./lib/util.js?"); -function defaults(target, defs) { - if (target == null) target = {}; - var ret = {}; - var keys = Object.keys(defs); - for (var i = 0, len = keys.length; i < len; i++) { - var key = keys[i]; - ret[key] = target[key] || defs[key]; - } - return ret; -} -exports.defaults = defaults; +/***/ }) -},{}]},{},[17])(17) -}); +/******/ }); +}); \ No newline at end of file diff --git a/dist/written-number.min.js b/dist/written-number.min.js index a1ab930..4ab262f 100644 --- a/dist/written-number.min.js +++ b/dist/written-number.min.js @@ -1 +1 @@ -!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.writtenNumber=a()}}(function(){return function(){function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){return e(b[g][1][a]||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g-1&&(!j.useBaseExceptionWhenNoTrailingNumbers||0===o&&s.length);x?s.push(w>1&&j.plural?j.plural:j.singular):s.push(q[w*l[o]]||p[w*l[o]])}else{var y;if("string"==typeof j?y=j:1===w||j.useSingularEnding&&w%10==1&&(!j.avoidEndingRules||j.avoidEndingRules.indexOf(w)<0)?y=j.singular:j.few&&(w>1&&w<5||j.useFewEnding&&w%10>1&&w%10<5&&(!j.avoidEndingRules||j.avoidEndingRules.indexOf(w)<0))?y=j.few:(y=!j.plural||j.avoidInNumberPlural&&r?j.singular:j.plural,y=2===w&&j.dual?j.dual:y,y=w>10&&j.restrictedPlural?j.singular:y),j.avoidPrefixException&&j.avoidPrefixException.indexOf(w)>-1)s.push(y);else{var z=c.unitExceptions[w],A=z||d(w,f.defaults({noAnd:!(c.andException&&c.andException[w]||j.andException),alternativeBase:j.useAlternativeBase},b));a-=w*l[o],s.push(A+" "+y)}}}var B=t*Math.floor(a/t),C=a-B;if(c.andWhenTrailing&&t&&0-1&&(!i.useBaseExceptionWhenNoTrailingNumbers||0===g&&v.length)?v.push(h>1&&i.plural?i.plural:i.singular):v.push(c[h*s[g]]||p[h*s[g]]);else if("string"==typeof i?m=i:1===h||i.useSingularEnding&&h%10==1&&(!i.avoidEndingRules||i.avoidEndingRules.indexOf(h)<0)?m=i.singular:i.few&&(h>1&&h<5||i.useFewEnding&&h%10>1&&h%10<5&&(!i.avoidEndingRules||i.avoidEndingRules.indexOf(h)<0))?m=i.few:(m=!i.plural||i.avoidInNumberPlural&&x?i.singular:i.plural,m=2===h&&i.dual?i.dual:m,m=h>10&&i.restrictedPlural?i.singular:m),i.avoidPrefixException&&i.avoidPrefixException.indexOf(h)>-1)v.push(m);else{var S=l.unitExceptions[h]||r(h,t.defaults({noAnd:!(l.andException&&l.andException[h]||i.andException),alternativeBase:i.useAlternativeBase},n));e-=h*s[g],v.push(S+" "+m)}}var b=e-f*Math.floor(e/f);if(l.andWhenTrailing&&f&&0 -1 &&\n (unit.useBaseExceptionWhenNoTrailingNumbers\n ? i === 0 && ret.length\n : true);\n if (!shouldUseBaseException) {\n ret.push(\n alternativeBaseCardinals[r * scale[i]] || baseCardinals[r * scale[i]]\n );\n } else {\n ret.push(r > 1 && unit.plural ? unit.plural : unit.singular);\n }\n continue;\n }\n\n var str;\n if (typeof unit === \"string\") {\n str = unit;\n } else if (\n r === 1 ||\n (unit.useSingularEnding &&\n r % 10 === 1 &&\n (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0))\n ) {\n str = unit.singular;\n } else if (\n unit.few &&\n ((r > 1 && r < 5) ||\n (unit.useFewEnding &&\n r % 10 > 1 &&\n r % 10 < 5 &&\n (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0)))\n ) {\n str = unit.few;\n } else {\n str =\n unit.plural && (!unit.avoidInNumberPlural || !m)\n ? unit.plural\n : unit.singular;\n\n // Languages with dual\n str = r === 2 && unit.dual ? unit.dual : str;\n\n // \"restrictedPlural\" : use plural only for 3 to 10\n str = r > 10 && unit.restrictedPlural ? unit.singular : str;\n }\n\n if (\n unit.avoidPrefixException &&\n unit.avoidPrefixException.indexOf(r) > -1\n ) {\n ret.push(str);\n continue;\n }\n\n var exception = language.unitExceptions[r];\n var number =\n exception ||\n writtenNumber(\n r,\n util.defaults(\n {\n // Languages with and exceptions need to set `noAnd` to false\n noAnd:\n !(\n (language.andException && language.andException[r]) ||\n unit.andException\n ) && true,\n alternativeBase: unit.useAlternativeBase\n },\n options\n )\n );\n n -= r * scale[i];\n ret.push(number + \" \" + str);\n }\n\n var firstSignificantN = firstSignificant * Math.floor(n / firstSignificant);\n var rest = n - firstSignificantN;\n\n if (\n language.andWhenTrailing &&\n firstSignificant &&\n 0 < rest &&\n ret[0].indexOf(language.unitSeparator) !== 0\n ) {\n ret = [ret[0], language.unitSeparator.replace(/\\s+$/, \"\")].concat(\n ret.slice(1)\n );\n }\n\n // Languages that have separators for all cardinals.\n if (language.allSeparator) {\n for (var j = 0; j < ret.length - 1; j++) {\n ret[j] = language.allSeparator + ret[j];\n }\n }\n var result = ret.reverse().join(\" \");\n return result;\n}\n\nfunction handleSmallerThan100(\n n,\n language,\n unit,\n baseCardinals,\n alternativeBaseCardinals,\n options\n) {\n var dec = Math.floor(n / 10) * 10;\n unit = n - dec;\n if (unit) {\n return (\n alternativeBaseCardinals[dec] ||\n baseCardinals[dec] + language.baseSeparator + writtenNumber(unit, options)\n );\n }\n return alternativeBaseCardinals[dec] || baseCardinals[dec];\n}\n\n\n//# sourceURL=webpack://writtenNumber/./lib/core.js?"); + +/***/ }), + +/***/ "./lib/standalone.js": +/*!***************************!*\ + !*** ./lib/standalone.js ***! + \***************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nmodule.exports = facade;\n\nvar util = __webpack_require__(/*! ./util */ \"./lib/util.js\");\nvar writtenNumber = __webpack_require__(/*! ./core */ \"./lib/core.js\");\n\nfacade.defaults = {\n noAnd: false,\n alternativeBase: null,\n lang: null\n};\n\n/**\n * Converts numbers to their written form.\n *\n * @param {Number} n The number to convert\n * @param {Object} options An object representation of the options\n * @return {String} writtenN The written form of `n`\n */\n\nfunction facade(n, options) {\n options = options || {};\n options = util.defaults(options, facade.defaults);\n\n if (n < 0) {\n return \"\";\n }\n\n n = Math.round(+n);\n\n var language = options.lang;\n\n if (language == null || typeof language === \"string\") {\n throw new TypeError(\n \"options.lang is required. Please import your [lang].json file from the i18n folder and specify it as the lang argument\"\n );\n }\n if (typeof language.base !== \"object\" || typeof language.units !== \"object\") {\n throw new TypeError(\"Please provide a valid lang object\");\n }\n\n options.lang = language;\n return writtenNumber(n, options);\n}\n\n\n//# sourceURL=webpack://writtenNumber/./lib/standalone.js?"); + +/***/ }), + +/***/ "./lib/util.js": +/*!*********************!*\ + !*** ./lib/util.js ***! + \*********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n/**\n * Merges a set of default keys with a target object\n * (Like _.defaults, but will also extend onto null/undefined)\n *\n * @param {Object} [target] The object to extend\n * @param {Object} defaults The object to default to\n * @return {Object} extendedTarget\n */\n\nfunction defaults(target, defs) {\n if (target == null) target = {};\n var ret = {};\n var keys = Object.keys(defs);\n for (var i = 0, len = keys.length; i < len; i++) {\n var key = keys[i];\n ret[key] = target[key] || defs[key];\n }\n return ret;\n}\nexports.defaults = defaults;\n\n\n//# sourceURL=webpack://writtenNumber/./lib/util.js?"); + +/***/ }) + +/******/ }); +}); \ No newline at end of file diff --git a/dist/written-number.standalone.min.js b/dist/written-number.standalone.min.js new file mode 100644 index 0000000..7dff59c --- /dev/null +++ b/dist/written-number.standalone.min.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.writtenNumber=n():e.writtenNumber=n()}(window,(function(){return function(e){var n={};function r(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)r.d(t,a,function(n){return e[n]}.bind(null,a));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=1)}([function(e,n,r){"use strict";n.defaults=function(e,n){null==e&&(e={});for(var r={},t=Object.keys(n),a=0,o=t.length;a-1&&(!r.useBaseExceptionWhenNoTrailingNumbers||0===p&&x.length)?x.push(y>1&&r.plural?r.plural:r.singular):x.push(c[y*l[p]]||d[y*l[p]]);else if("string"==typeof r?h=r:1===y||r.useSingularEnding&&y%10==1&&(!r.avoidEndingRules||r.avoidEndingRules.indexOf(y)<0)?h=r.singular:r.few&&(y>1&&y<5||r.useFewEnding&&y%10>1&&y%10<5&&(!r.avoidEndingRules||r.avoidEndingRules.indexOf(y)<0))?h=r.few:(h=!r.plural||r.avoidInNumberPlural&&g?r.singular:r.plural,h=2===y&&r.dual?r.dual:h,h=y>10&&r.restrictedPlural?r.singular:h),r.avoidPrefixException&&r.avoidPrefixException.indexOf(y)>-1)x.push(h);else{var E=o.unitExceptions[y]||u(y,t.defaults({noAnd:!(o.andException&&o.andException[y]||r.andException),alternativeBase:r.useAlternativeBase},n));e-=y*l[p],x.push(E+" "+h)}}var j=e-v*Math.floor(e/v);if(o.andWhenTrailing&&v&&0 -1 && + (unit.useBaseExceptionWhenNoTrailingNumbers + ? i === 0 && ret.length + : true); + if (!shouldUseBaseException) { + ret.push( + alternativeBaseCardinals[r * scale[i]] || baseCardinals[r * scale[i]] + ); + } else { + ret.push(r > 1 && unit.plural ? unit.plural : unit.singular); + } + continue; + } + + var str; + if (typeof unit === "string") { + str = unit; + } else if ( + r === 1 || + (unit.useSingularEnding && + r % 10 === 1 && + (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0)) + ) { + str = unit.singular; + } else if ( + unit.few && + ((r > 1 && r < 5) || + (unit.useFewEnding && + r % 10 > 1 && + r % 10 < 5 && + (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0))) + ) { + str = unit.few; + } else { + str = + unit.plural && (!unit.avoidInNumberPlural || !m) + ? unit.plural + : unit.singular; + + // Languages with dual + str = r === 2 && unit.dual ? unit.dual : str; + + // "restrictedPlural" : use plural only for 3 to 10 + str = r > 10 && unit.restrictedPlural ? unit.singular : str; + } + + if ( + unit.avoidPrefixException && + unit.avoidPrefixException.indexOf(r) > -1 + ) { + ret.push(str); + continue; + } + + var exception = language.unitExceptions[r]; + var number = + exception || + writtenNumber( + r, + util.defaults( + { + // Languages with and exceptions need to set `noAnd` to false + noAnd: + !( + (language.andException && language.andException[r]) || + unit.andException + ) && true, + alternativeBase: unit.useAlternativeBase + }, + options + ) + ); + n -= r * scale[i]; + ret.push(number + " " + str); + } + + var firstSignificantN = firstSignificant * Math.floor(n / firstSignificant); + var rest = n - firstSignificantN; + + if ( + language.andWhenTrailing && + firstSignificant && + 0 < rest && + ret[0].indexOf(language.unitSeparator) !== 0 + ) { + ret = [ret[0], language.unitSeparator.replace(/\s+$/, "")].concat( + ret.slice(1) + ); + } + + // Languages that have separators for all cardinals. + if (language.allSeparator) { + for (var j = 0; j < ret.length - 1; j++) { + ret[j] = language.allSeparator + ret[j]; + } + } + var result = ret.reverse().join(" "); + return result; +} + +function handleSmallerThan100( + n, + language, + unit, + baseCardinals, + alternativeBaseCardinals, + options +) { + var dec = Math.floor(n / 10) * 10; + unit = n - dec; + if (unit) { + return ( + alternativeBaseCardinals[dec] || + baseCardinals[dec] + language.baseSeparator + writtenNumber(unit, options) + ); + } + return alternativeBaseCardinals[dec] || baseCardinals[dec]; +} diff --git a/lib/index.js b/lib/index.js index 4114399..a77a28b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,8 +1,23 @@ "use strict"; -exports = module.exports = writtenNumber; +exports = module.exports = facade; var util = require("./util"); - -var languages = ["en", "es", "ar", "az", "pt", "fr", "eo", "it", "vi", "tr", "uk", "ru", "id"]; +var writtenNumber = require("./core"); + +var languages = [ + "en", + "es", + "ar", + "az", + "pt", + "fr", + "eo", + "it", + "vi", + "tr", + "uk", + "ru", + "id" +]; var i18n = { en: require("./i18n/en.json"), es: require("./i18n/es.json"), @@ -23,202 +38,34 @@ var i18n = { }; exports.i18n = i18n; -var shortScale = [100]; -for (var i = 1; i <= 16; i++) { - shortScale.push(Math.pow(10, i * 3)); -} - -var longScale = [100, 1000]; -for (i = 1; i <= 15; i++) { - longScale.push(Math.pow(10, i * 6)); -} - -writtenNumber.defaults = { +facade.defaults = { noAnd: false, alternativeBase: null, lang: "en" }; /** - * Converts numbers to their written form. + * Facade for the writtenNumber function * * @param {Number} n The number to convert * @param {Object} [options] An object representation of the options * @return {String} writtenN The written form of `n` */ -function writtenNumber(n, options) { +function facade(n, options) { options = options || {}; - options = util.defaults(options, writtenNumber.defaults); + options = util.defaults(options, facade.defaults); - if (n < 0) { - return ""; - } - - n = Math.round(+n); - - var language = typeof options.lang === "string" - ? i18n[options.lang] - : options.lang; + var language = + typeof options.lang === "string" ? i18n[options.lang] : options.lang; if (!language) { - if (languages.indexOf(writtenNumber.defaults.lang) < 0) { - writtenNumber.defaults.lang = "en"; + if (languages.indexOf(facade.defaults.lang) < 0) { + facade.defaults.lang = "en"; } - language = i18n[writtenNumber.defaults.lang]; - } - - var scale = language.useLongScale ? longScale : shortScale; - var units = language.units; - var unit; - - if (!(units instanceof Array)) { - var rawUnits = units; - - units = []; - scale = Object.keys(rawUnits); - - for (var i in scale) { - units.push(rawUnits[scale[i]]); - scale[i] = Math.pow(10, parseInt(scale[i])); - } - } - - var baseCardinals = language.base; - var alternativeBaseCardinals = options.alternativeBase - ? language.alternativeBase[options.alternativeBase] - : {}; - - if (language.unitExceptions[n]) return language.unitExceptions[n]; - if (alternativeBaseCardinals[n]) return alternativeBaseCardinals[n]; - if (baseCardinals[n]) return baseCardinals[n]; - if (n < 100) - return handleSmallerThan100(n, language, unit, baseCardinals, alternativeBaseCardinals, options); - - var m = n % 100; - var ret = []; - - if (m) { - if ( - options.noAnd && - !(language.andException && language.andException[10]) - ) { - ret.push(writtenNumber(m, options)); - } else { - ret.push(language.unitSeparator + writtenNumber(m, options)); - } - } - - var firstSignificant; - - for (var i = 0, len = units.length; i < len; i++) { - var r = Math.floor(n / scale[i]); - var divideBy; - - if (i === len - 1) divideBy = 1000000; - else divideBy = scale[i + 1] / scale[i]; - - r %= divideBy; - - unit = units[i]; - - if (!r) continue; - firstSignificant = scale[i]; - - if (unit.useBaseInstead) { - var shouldUseBaseException = - unit.useBaseException.indexOf(r) > -1 && - (unit.useBaseExceptionWhenNoTrailingNumbers - ? i === 0 && ret.length - : true); - if (!shouldUseBaseException) { - ret.push(alternativeBaseCardinals[r * scale[i]] || baseCardinals[r * scale[i]]); - } else { - ret.push(r > 1 && unit.plural ? unit.plural : unit.singular); - } - continue; - } - - var str; - if (typeof unit === "string") { - str = unit; - } else if (r === 1 || unit.useSingularEnding && r % 10 === 1 - && (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0)) { - str = unit.singular; - } else if (unit.few && (r > 1 && r < 5 || unit.useFewEnding && r % 10 > 1 && r % 10 < 5 - && (!unit.avoidEndingRules || unit.avoidEndingRules.indexOf(r) < 0))) { - str = unit.few; - } else { - str = unit.plural && (!unit.avoidInNumberPlural || !m) - ? unit.plural - : unit.singular; - - // Languages with dual - str = (r === 2 && unit.dual) ? unit.dual : str; - - // "restrictedPlural" : use plural only for 3 to 10 - str = (r > 10 && unit.restrictedPlural) ? unit.singular : str; - } - - if ( - unit.avoidPrefixException && - unit.avoidPrefixException.indexOf(r) > -1 - ) { - ret.push(str); - continue; - } - - var exception = language.unitExceptions[r]; - var number = - exception || - writtenNumber( - r, - util.defaults( - { - // Languages with and exceptions need to set `noAnd` to false - noAnd: !((language.andException && language.andException[r]) || - unit.andException) && true, - alternativeBase: unit.useAlternativeBase - }, - options - ) - ); - n -= r * scale[i]; - ret.push(number + " " + str); - } - - var firstSignificantN = firstSignificant * Math.floor(n / firstSignificant); - var rest = n - firstSignificantN; - - if ( - language.andWhenTrailing && - firstSignificant && - 0 < rest && - ret[0].indexOf(language.unitSeparator) !== 0 - ) { - ret = [ret[0], language.unitSeparator.replace(/\s+$/, "")].concat( - ret.slice(1) - ); - } - - // Languages that have separators for all cardinals. - if (language.allSeparator) { - for (var j = 0; j < ret.length-1; j++) { - ret[j] = language.allSeparator + ret[j]; - } - } - var result = ret.reverse().join(" "); - return result; -} - -function handleSmallerThan100(n, language, unit, baseCardinals, alternativeBaseCardinals, options) { - var dec = Math.floor(n / 10) * 10; - unit = n - dec; - if (unit) { - return ( - alternativeBaseCardinals[dec] || baseCardinals[dec] + language.baseSeparator + writtenNumber(unit, options) - ); + language = i18n[facade.defaults.lang]; } - return alternativeBaseCardinals[dec] || baseCardinals[dec]; + options.lang = language; + return writtenNumber(n, options); } diff --git a/lib/standalone.js b/lib/standalone.js new file mode 100644 index 0000000..a67904d --- /dev/null +++ b/lib/standalone.js @@ -0,0 +1,37 @@ +"use strict"; +module.exports = facade; + +var util = require("./util"); +var writtenNumber = require("./core"); + +facade.defaults = { + noAnd: false, + alternativeBase: null, + lang: null +}; + +/** + * Facade for the writtenNumber function + * + * @param {Number} n The number to convert + * @param {Object} options An object representation of the options + * @return {String} writtenN The written form of `n` + */ + +function facade(n, options) { + options = options || {}; + options = util.defaults(options, facade.defaults); + + var language = options.lang; + + if (language == null || typeof language === "string") { + throw new TypeError( + "options.lang is required. Please import your [lang].json file from the i18n folder and specify it as the lang argument" + ); + } + if (typeof language.base !== "object" || typeof language.units !== "object") { + throw new TypeError("Please provide a valid lang object"); + } + + return writtenNumber(n, options); +} diff --git a/package.json b/package.json index e2d2597..3941509 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,11 @@ { "name": "written-number", - "version": "0.11.0", + "version": "0.12.0", "description": "Convert numbers to words - their written form.", "main": "lib/index.js", "scripts": { + "prebuild": "rimraf dist", + "build": "webpack && NODE_ENV=production webpack && webpack --config=webpack.config.standalone.js && NODE_ENV=production webpack --config=webpack.config.standalone.js ", "test": " mocha --require blanket -R mocha-spec-cov-alt" }, "keywords": [ @@ -25,15 +27,16 @@ }, "devDependencies": { "blanket": "1.1.7", - "grunt": "^1.0.3", - "grunt-browserify": "^5.3.0", - "grunt-cli": "^1.2.0", - "grunt-contrib-clean": "^1.1.0", - "grunt-contrib-uglify": "^2.3.0", + "copy-webpack-plugin": "5.0.4", + "cross-env": "6.0.3", "mocha": "^3.5.3", "mocha-spec-cov-alt": "^1.1.1", "mversion": "^1.10.0", - "should": "^11.2.1" + "prettier": "1.18.2", + "rimraf": "3.0.0", + "should": "^11.2.1", + "webpack": "4.41.0", + "webpack-cli": "3.3.9" }, "config": { "blanket": { diff --git a/test/standalone.test.js b/test/standalone.test.js new file mode 100644 index 0000000..c6a62b0 --- /dev/null +++ b/test/standalone.test.js @@ -0,0 +1,55 @@ +"use strict" /* global describe, it, before */; +var should = require("should"); +var writtenNumber = require("../lib/standalone"); + +var en = require("../lib/i18n/en"); +var es = require("../lib/i18n/es"); + +describe("written-number.standalone", function() { + describe("writtenNumber(n, { lang: 'zzz', ... })", function() { + before(function() { + writtenNumber.defaults.lang = ""; + }); + + it("gets exposed", function() { + should.exist(writtenNumber); + writtenNumber.should.be.instanceof(Function); + }); + + it("throws an error with invalid or no lang object", function() { + should.throws(() => { + writtenNumber(1, { lang: "zzz" }); + }, TypeError); + should.throws(() => { + writtenNumber(1); + }, TypeError); + should.throws(() => { + writtenNumber(1, { lang: { wrong: "stuff" } }); + }, TypeError); + }); + }); + + describe("writtenNumber(n, { lang: enObject, ... })", function() { + before(function() { + writtenNumber.defaults.lang = en; + }); + + it("correctly converts numbers < 10", function() { + writtenNumber(1000000000).should.equal("one billion"); + writtenNumber(3).should.equal("three"); + writtenNumber(8).should.equal("eight"); + }); + }); + + describe("writtenNumber(n, { lang: esObject, ... })", function() { + before(function() { + writtenNumber.defaults.lang = es; + }); + + it("correctly converts numbers < 10", function() { + writtenNumber(1).should.equal("uno"); + writtenNumber(3).should.equal("tres"); + writtenNumber(8).should.equal("ocho"); + }); + }); +}); diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..6d0d4df --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,13 @@ +const path = require("path"); +const PROD = process.env.NODE_ENV === "production"; + +module.exports = { + mode: PROD ? "production" : "development", + entry: "./lib/index.js", + output: { + path: path.resolve(__dirname, "dist"), + filename: PROD ? "written-number.min.js" : "written-number.js", + library: "writtenNumber", + libraryTarget: "umd" + } +}; diff --git a/webpack.config.standalone.js b/webpack.config.standalone.js new file mode 100644 index 0000000..9d53704 --- /dev/null +++ b/webpack.config.standalone.js @@ -0,0 +1,25 @@ +const path = require("path"); +const CopyPlugin = require("copy-webpack-plugin"); + +const PROD = process.env.NODE_ENV === "production"; + +module.exports = { + mode: PROD ? "production" : "development", + entry: "./lib/standalone.js", + output: { + path: path.resolve(__dirname, "dist"), + filename: PROD + ? "written-number.standalone.min.js" + : "written-number.standalone.js", + library: "writtenNumber", + libraryTarget: "umd" + }, + plugins: [ + new CopyPlugin([ + { + from: path.resolve(__dirname, "lib/i18n"), + to: path.resolve(__dirname, "dist/i18n") + } + ]) + ] +};