JSPM

  • Created
  • Published
  • Downloads 10234
  • Score
    100M100P100Q161807F
  • License MIT

Lightweight and Customizeable Vue 2 Currency Filter

Package Exports

  • vue-currency-filter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-currency-filter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vue-currency-filter

License Github Issue GitHub Fork GitHub Star

version downloads monthly downloads

Travis codecov

💲 Lightweight and Customizeable Vue 2 Currency Filter

Demo

https://mazipan.github.io/vue-currency-filter/

Download

NPM :

npm install vue-currency-filter

Yarn :

yarn add vue-currency-filter

Sample Usage

Import in main.js :

import VueCurrencyFilter from 'vue-currency-filter'

Use Plugins :

Vue.use(VueCurrencyFilter)

Add Global Configuration :

Vue.use(VueCurrencyFilter, 
{
  symbol : '$', 
  thousandsSeparator: '.',
  fractionCount: 2,
  fractionSeparator: ',',
  symbolPosition: 'front',
  symbolSpacing: true
})

Use in View :

<span>{{ 20000 | currency}}</span>

Add Configuration In Specific Place :

<span>
{{ textInput | currency(configSymbol, configSeparator, configFractionCount, 
configFractionSeparator, configSymbolPosition, configSymbolSpacing)}}
</span>
                    

Available Options

{
  symbol: 'string (default : empty string)',
  thousandsSeparator: 'string (default : .)',
  fractionCount: 'number (default : 0)',
  fractionSeparator: 'string (default: ",")',
  symbolPosition: 'string (default: front)',
  symbolSpacing: 'boolean (default: true)'
}

Contributing

If you'd like to contribute, head to the contributing guidelines. Inside you'll find directions for opening issues, coding standards, and notes on development.

Hope this will be useful for you all.

Contact Me :

Email Website Facebook

Twitter Linkedin Slideshare