- Tiny reusable Vue wrapper for Intl NumberFormat
-
Demo Link: Click Here
-
This is on GitHub so let me know if I've b0rked it somewhere, give me a star ⭐ if you like it 🍻
yarn add vue-intl-numberformat
<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>
Name | Type | Required? | Description |
---|---|---|---|
number |
Number | Yes | The digit that you want to format. |
locale |
String | No | A string with a BCP 47 language tag. More Here |
formatStyle |
String | No | The 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 ". |
currency |
String | No | The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar etc. More Here |
maxDigits |
Number | No | The maximum number of significant digits to use. Possible values are from 1 to 21. |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
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