1.0.1 • Published 2 years ago

amount-to-words-js v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Amount to words

Convert amount in letter.

About

This repository is combined 3 languages converter into single package\ Wrap two library from npm package and add support for burmese language

For Chinese language: number-to-chinese-words\ For English language: amount-to-words\ For Burmese language: my own source code

    const {AmountToWords, AmountConversion} = require('amount-to-words');
    
    let output = AmountToWords.convertTo(123456789, AmountConversion.BURMESE);
    // output => တစ်ထောင်နှစ်ရာသုံးဆယ့်လေးသိန်းငါးသောင်းခြှောက်ထောင်ခုနှစ်ရာရှစ်ဆယ့်ကိုးကျပ်
    ...
    let output = AmountToWords.convertTo(123456789, AmountConversion.ENGLISH);
    // output => Twelve Crore Thirty Four Lakh Fifty Six Thousand Seven Hundred And Ninety Eight
    ...
    let output = AmountToWords.convertTo(123456789, AmountConversion.CHINESE);
    // output => 一億二千三百四十五萬六千七百九十八

Max convertable amount in different language

LanguageMax convertableDigit
Burmese< 1000000000000013 digit
English< 10000000009 digit
Chinese< 1000000008 digit

Ported languages

Java: https://github.com/jianshangquan/AmountToWordsJava \ Javascript: https://github.com/jianshangquan/AmountToWordsJavascript \ Dart: https://github.com/jianshangquan/AmountToWordsDart \ Rust: https://github.com/jianshangquan/AmountToWordsRust