Nebulous Puffy Marshmallows
    Wondering what’s next for npm?Check out our public roadmap! »

    crnc

    0.0.0-dev.22 • Public • Published

    -c-r-n-c-
    currency conversions and formatting for the web

    npm install crnc

    • this is the currency library for shopper
    • downloads exchange rates from the bank of canada's public api
    • caches results in localStorage for an hour by default
    • no real documentation, read the source (so sorry)
    • open source, contributions welcome

    crnc is a collection of handy functions

    currency tools

    • downloadExchangeRates
      download somewhat up-to-date currency exchange info from the internet

    • convertCurrency
      exchange a money value from one currency to another

    • formatCurrency
      express a money value as a human-readable string
      (adds dollar signs and commas and stuff)

    • convertAndFormatCurrency
      exchange a money value, and format it, in one shot
      (simply a convenience function, combines the two above)

    ecommerce helpers

    Install

    npm i crnc

    DownloadsWeekly Downloads

    2,103

    Version

    0.0.0-dev.22

    License

    ISC

    Unpacked Size

    68.9 kB

    Total Files

    83

    Last publish

    Collaborators

    • avatar