vue-currency-input
Advanced tools
Comparing version 1.18.1 to 1.18.2
/** | ||
* Vue Currency Input 1.18.1 | ||
* Vue Currency Input 1.18.2 | ||
* (c) 2020 Matthias Stiller | ||
@@ -11,3 +11,3 @@ * @license MIT | ||
var types = parts.map(function (p) { return p.type; }); | ||
var digits = [].concat( Array(10).keys() ).map(function (i) { return i.toLocaleString(numberFormat.resolvedOptions().locale); }); | ||
var digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(function (i) { return i.toLocaleString(numberFormat.resolvedOptions().locale); }); | ||
var prefix = parts.slice(0, types.indexOf('integer')).map(function (p) { return p.value; }).join(''); | ||
@@ -14,0 +14,0 @@ var suffix = parts.slice(Math.max(types.lastIndexOf('integer'), types.indexOf('fraction')) + 1).map(function (p) { return p.value; }).join(''); |
/** | ||
* Vue Currency Input 1.18.1 | ||
* Vue Currency Input 1.18.2 | ||
* (c) 2020 Matthias Stiller | ||
@@ -17,3 +17,3 @@ * @license MIT | ||
var types = parts.map(function (p) { return p.type; }); | ||
var digits = [].concat( Array(10).keys() ).map(function (i) { return i.toLocaleString(numberFormat.resolvedOptions().locale); }); | ||
var digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(function (i) { return i.toLocaleString(numberFormat.resolvedOptions().locale); }); | ||
var prefix = parts.slice(0, types.indexOf('integer')).map(function (p) { return p.value; }).join(''); | ||
@@ -20,0 +20,0 @@ var suffix = parts.slice(Math.max(types.lastIndexOf('integer'), types.indexOf('fraction')) + 1).map(function (p) { return p.value; }).join(''); |
{ | ||
"name": "vue-currency-input", | ||
"description": "Easy input of currency formatted numbers for Vue.js.", | ||
"version": "1.18.1", | ||
"version": "1.18.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "unpkg": "dist/vue-currency-input.umd.js", |
@@ -22,3 +22,2 @@ [](https://travis-ci.com/dm4t2/vue-currency-input) | ||
* Works with input components of popular frameworks like [Vuetify](https://vuetifyjs.com/en/components/text-fields) or [Element](https://element.eleme.io/#/en-US/component/input) | ||
* Supports all major browsers (including IE 11) | ||
@@ -25,0 +24,0 @@ ## Live Demo |
@@ -5,3 +5,3 @@ const formatToParts = (number, numberFormat) => { | ||
const digits = [...Array(10).keys()].map(i => i.toLocaleString(numberFormat.resolvedOptions().locale)) | ||
const digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(i => i.toLocaleString(numberFormat.resolvedOptions().locale)) | ||
const prefix = parts.slice(0, types.indexOf('integer')).map(p => p.value).join('') | ||
@@ -8,0 +8,0 @@ const suffix = parts.slice(Math.max(types.lastIndexOf('integer'), types.indexOf('fraction')) + 1).map(p => p.value).join('') |
78965
62