1.0.0 • Published 6 years ago

vue-intl-numberformat v1.0.0

Weekly downloads
18
License
SEE LICENSE IN LI...
Repository
github
Last release
6 years ago

Vue Intl.NumberFormat

NPM version NPM downloads CircleCI

  • Tiny reusable Vue wrapper for Intl NumberFormat
  • This is on GitHub so let me know if I've b0rked it somewhere, give me a star :star: if you like it :beers:

Install

yarn add vue-intl-numberformat

CDN: UNPKG | jsDelivr

Usage

<template>
  <vue-intl-numberformat locale="en-IN" formatStyle="currency" currency="INR" :number="303041.201"></vue-intl-numberformat>
</template>

<script>
import VueIntlNumberformat from 'vue-intl-numberformat';

export default {
  components: {
    VueIntlNumberformat,
  },
};
</script>

API

Props

NameTypeRequired?Description
numberNumberYesThe digit that you want to format.
localeStringNoA string with a BCP 47 language tag. More Here
formatStyleStringNoThe formatting style to use. Possible values are "decimal" for plain number formatting, "currency" for currency formatting, and "percent" for percent formatting; the default is "decimal".
currencyStringNoThe currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar etc. More Here
maxDigitsNumberNoThe maximum number of significant digits to use. Possible values are from 1 to 21.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

vue-intl-numberformat © Vinayak, Released under the MIT License. Authored and maintained by Vinayak Kulkarni with help from contributors (list).

vinayak.site · GitHub @vinayakkulkarni · Twitter @_vinayak_k