New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-currency-input

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-currency-input - npm Package Compare versions

Comparing version 1.15.0 to 1.15.1

21

dist/vue-currency-input.esm.js
/**
* Vue Currency Input 1.15.0
* Vue Currency Input 1.15.1
* (c) 2019 Matthias Stiller

@@ -366,14 +366,13 @@ * @license MIT

var format = function (el, value) {
var oldValue = el.$ci.numberValue;
updateInputValue(el, value);
var ref = el.$ci;
var newValue = ref.numberValue;
var numberValue = ref.numberValue;
var currencyFormat = ref.currencyFormat;
var options = ref.options;
var inputEvent = ref.inputEvent;
if (newValue != null) {
newValue = toInteger(newValue, options.valueAsInteger, currencyFormat.maximumFractionDigits);
if (numberValue != null) {
numberValue = toInteger(numberValue, options.valueAsInteger, currencyFormat.maximumFractionDigits);
}
if (inputEvent) {
dispatchEvent(el, inputEvent, { oldValue: oldValue, newValue: newValue });
dispatchEvent(el, inputEvent, { numberValue: numberValue });
}

@@ -543,8 +542,6 @@ };

return Object.assign({}, listeners,
( obj = {}, obj[inputEvent] = function (e) {
var ref = e.detail;
var oldValue = ref.oldValue;
var newValue = ref.newValue;
if (oldValue !== newValue) {
this$1.$emit('input', newValue);
( obj = {}, obj[inputEvent] = function (ref) {
var detail = ref.detail;
if (this$1.value !== detail.numberValue) {
this$1.$emit('input', detail.numberValue);
}

@@ -551,0 +548,0 @@ this$1.formattedValue = this$1.$el.value;

/**
* Vue Currency Input 1.15.0
* Vue Currency Input 1.15.1
* (c) 2019 Matthias Stiller

@@ -372,14 +372,13 @@ * @license MIT

var format = function (el, value) {
var oldValue = el.$ci.numberValue;
updateInputValue(el, value);
var ref = el.$ci;
var newValue = ref.numberValue;
var numberValue = ref.numberValue;
var currencyFormat = ref.currencyFormat;
var options = ref.options;
var inputEvent = ref.inputEvent;
if (newValue != null) {
newValue = toInteger(newValue, options.valueAsInteger, currencyFormat.maximumFractionDigits);
if (numberValue != null) {
numberValue = toInteger(numberValue, options.valueAsInteger, currencyFormat.maximumFractionDigits);
}
if (inputEvent) {
dispatchEvent(el, inputEvent, { oldValue: oldValue, newValue: newValue });
dispatchEvent(el, inputEvent, { numberValue: numberValue });
}

@@ -549,8 +548,6 @@ };

return Object.assign({}, listeners,
( obj = {}, obj[inputEvent] = function (e) {
var ref = e.detail;
var oldValue = ref.oldValue;
var newValue = ref.newValue;
if (oldValue !== newValue) {
this$1.$emit('input', newValue);
( obj = {}, obj[inputEvent] = function (ref) {
var detail = ref.detail;
if (this$1.value !== detail.numberValue) {
this$1.$emit('input', detail.numberValue);
}

@@ -557,0 +554,0 @@ this$1.formattedValue = this$1.$el.value;

{
"name": "vue-currency-input",
"description": "Easy input of currency formatted numbers for Vue.js.",
"version": "1.15.0",
"version": "1.15.1",
"license": "MIT",

@@ -41,3 +41,2 @@ "unpkg": "dist/vue-currency-input.umd.js",

},
"dependencies": {},
"peerDependencies": {

@@ -47,2 +46,3 @@ "vue": "^2.5"

"devDependencies": {
"@mdi/font": "^4.7.95",
"@vue/cli-plugin-babel": "^4.1.1",

@@ -65,4 +65,5 @@ "@vue/cli-plugin-eslint": "^4.1.1",

"vue-template-compiler": "^2.6.11",
"vuepress": "^1.2.0"
"vuepress": "^1.2.0",
"vuetify": "^2.1.15"
}
}
[![Build Status](https://travis-ci.com/dm4t2/vue-currency-input.svg?branch=master)](https://travis-ci.com/dm4t2/vue-currency-input)
[![codecov](https://codecov.io/gh/dm4t2/vue-currency-input/branch/master/graph/badge.svg)](https://codecov.io/gh/dm4t2/vue-currency-input)
[![npm version](https://badge.fury.io/js/vue-currency-input.svg)](https://badge.fury.io/js/vue-currency-input)
![](https://img.shields.io/npm/l/vue-currency-input.svg)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f094b44873724daf98afa67f8f68c456)](https://www.codacy.com/manual/dm4t2/vue-currency-input)
[![npm version](https://badgen.net/npm/v/vue-currency-input?color=green)](https://www.npmjs.com/package/vue-currency-input)
[![Bundlephobia](https://badgen.net/bundlephobia/minzip/vue-currency-input?color=green)](https://bundlephobia.com/result?p=vue-currency-input)
[![License](https://badgen.net/github/license/dm4t2/vue-currency-input?color=green)](https://github.com/dm4t2/vue-currency-input/blob/master/LICENSE)

@@ -9,21 +11,6 @@ # Vue Currency Input

[Read the guide](https://dm4t2.github.io/vue-currency-input/guide/) to getting started or check out the [examples](https://dm4t2.github.io/vue-currency-input/examples/) to see it in action.
[![](docs/vue-currency-input.gif)](https://dm4t2.github.io/vue-currency-input)
## Features
[Read the guide](https://dm4t2.github.io/vue-currency-input/guide/) to getting started or check out the [playground](https://dm4t2.github.io/vue-currency-input/playground/) to see it in action.
### Lightweight
Only [~3 kB bundle size](https://bundlephobia.com/result?p=vue-currency-input) (minified + gzipped) and zero dependencies.
### Format as you type
Numbers are formatted immediately during input.
### i18n support
Language-dependent, ISO-compliant currency formatting using the native [Intl.NumberFormat](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat).
### Auto decimal mode
Automatically insert the decimal symbol and use the last inputted digits as decimal digits.
### Distraction free
Automatically hide the formatting and negligible decimal digits on focus.
## Support me

@@ -30,0 +17,0 @@ If you find this plugin helpful or you want to support the development, buy me a coffee:

@@ -85,6 +85,5 @@ import currencyDirective from './directive'

...listeners,
[inputEvent]: (e) => {
const { oldValue, newValue } = e.detail
if (oldValue !== newValue) {
this.$emit('input', newValue)
[inputEvent]: ({ detail }) => {
if (this.value !== detail.numberValue) {
this.$emit('input', detail.numberValue)
}

@@ -91,0 +90,0 @@ this.formattedValue = this.$el.value

@@ -91,10 +91,9 @@ import Vue from 'vue'

const format = (el, value) => {
const oldValue = el.$ci.numberValue
updateInputValue(el, value)
let { numberValue: newValue, currencyFormat, options, inputEvent } = el.$ci
if (newValue != null) {
newValue = toInteger(newValue, options.valueAsInteger, currencyFormat.maximumFractionDigits)
let { numberValue, currencyFormat, options, inputEvent } = el.$ci
if (numberValue != null) {
numberValue = toInteger(numberValue, options.valueAsInteger, currencyFormat.maximumFractionDigits)
}
if (inputEvent) {
dispatchEvent(el, inputEvent, { oldValue, newValue })
dispatchEvent(el, inputEvent, { numberValue })
}

@@ -101,0 +100,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc