vue-intl-numberformat
Tiny reusable Vue wrapper for Intl NumberFormat
1,257
5
| Install | |
|---|---|
npm install vue-intl-numberformat |
|
| Latest Version: | 1.0.0 |
| Vue: | 2 |
| License: | Custom |
| Last Updated: | Mar 27, 2024 |
| Links: | GitHub · npm |
Maintainer: vinayakkulkarni
Vue Intl.NumberFormat
- 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
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
| 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. |
Contributing
- 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
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
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.0 | ^2.5.16 | Custom |