@heathmont/money
    TypeScript icon, indicating that this package has built-in type declarations

    2.4.15 • Public • Published

    Usage

    npm install --save "@heathmont/money"
    import { toInteger, fromInteger, convertUnit } from "@heathmont/money";

    toInteger(amount, currency, [unit])

    toInteger(111111.222333443, 'BTC')
    11111122233344
    
    toInteger(111111222.333443, 'BTC', 'mBTC')
    11111122233344
    
    toInteger(111111.223332, 'EUR')
    11111122333
    
    toInteger(11111122.3332, 'EUR', 'cent')
    11111122333

    fromInteger(amount, currency, [unit])

    fromInteger(11111122233344, 'BTC')
    111111.22233344
    
    fromInteger(11111122233344, 'BTC', 'uBTC')
    111111222333.44
    
    fromInteger(11111122333, 'EUR')
    111111.22333
    
    fromInteger(11111122333, 'EUR', 'cent')
    11111122.333

    convertUnit(amount, currency, fromUnit, toUnit)

    convertUnit(111111222.333443, 'BTC', 'mBTC', 'uBTC')
    111111222333.44
    
    convertUnit(111111.223332, 'EUR', 'EUR', 'cent')
    11111122.333

    Keywords

    none

    Install

    npm i @heathmont/money

    DownloadsWeekly Downloads

    1,531

    Version

    2.4.15

    License

    none

    Unpacked Size

    17.3 kB

    Total Files

    12

    Last publish

    Collaborators

    • kyrylyshen-yaroslav
    • min_max
    • iuzhakov
    • denissamoilov
    • ysemeniuk
    • mrvallon
    • bartkarp
    • andero
    • neemeeller
    • anderson.amorim
    • bsk-dataart
    • jsoots
    • islmv
    • hm_robot
    • drownbes
    • dimo89
    • hypno
    • kriips
    • bulldozer
    • twinsmaj
    • segaz2002
    • kiote_the_one
    • kasparaasamets
    • mkjell
    • dennisnikiforov
    • wildstrings
    • janch0
    • n-porsh
    • alexsapoznikov
    • nightspite
    • tim2cf
    • nemtish
    • mlamp
    • d_kireev
    • peeter
    • karl-kallavus
    • bilalj
    • nszatkowski
    • yanmhlv
    • prushin
    • krisseliine1
    • alexalferow
    • anti32
    • xsagaroth
    • vladimir.puz
    • nucleartux
    • dpshnv
    • yara5000
    • benitezmv
    • manasovdan
    • edgarhm
    • roman.danilov
    • swither
    • yuliana84
    • alekstv
    • emwp
    • andreisbitnev
    • ishchepin
    • sergeibko
    • mikita.lisavets
    • ulyssesmurja
    • no4ek
    • alexjs_dev
    • olegkivi
    • beygi
    • tidart
    • eldarsagirovda
    • boyko_ivanov
    • thais_oliveira
    • yolo.svc
    • kirilli-gerasimenko-da
    • musimire
    • mkharsun
    • boris.burenkov.dataart
    • vladbiletskyi-da
    • anil.wadghule.esl
    • sergey.suprunenko
    • ayrat555
    • phcurado
    • zhirayr.shirinyan.da
    • jegaxd26
    • varmamsp
    • jthvjn
    • marinakulenkova
    • karlosmid
    • vladimir.korotkov
    • ioan-badila
    • tsenturk
    • alexisdevtailor
    • rpihlak
    • therealsmat
    • karljogi
    • sisavi