vue-mny

    0.3.1 • Public • Published

    vue-mny

    Currency formatting for all currencies, and all languages. As a simple Vue plugin.

    GitHub last commit GitHub version

    npm version npm downloads Build Status

    v0.3.1

    Setup

    npm install vue-mny --save
    const vueMny = require('vue-mny');
    Vue.use(vueMny, {
        locale: 'en-US',
        currency: 'USD',
        currencyDisplay: 'symbol',
    });

    Usage

    easyway

    <span v-mny="moneyVariable"></span>    

    withoptions

    <span v-mny="{ input: moneyVariable, currency: 'EUR' }"></span>    
     
    // shorthand:
    <span v-mny.code="moneyVariable"></span>

    Options

    {
        locale: 'en-US',
        currency: 'USD',
        currencyDisplay: 'symbol',
    }

    locale

    default: en-US
    A string with a BCP 47 language tag.

    currency

    default: USD

    Possible values are the ISO 4217 currency codes, such as USD for the US dollar, EUR for the euro, or CNY for the Chinese RMB.

    currencyDisplay

    default: symbol
    How to display the currency in currency formatting. Possible values are symbol to use a localized currency symbol such as €, code to use the ISO currency code, name to use a localized currency name such as dollar.

    Changelog

    version 0.3.1

    • Patch

    version 0.3.0

    • Major improvements...

    Dependencies (0)

      Dev Dependencies (0)

        Install

        npm i vue-mny

        DownloadsWeekly Downloads

        5

        Version

        0.3.1

        License

        MIT

        Unpacked Size

        312 kB

        Total Files

        10

        Last publish

        Collaborators

        • casbloem