Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-model-on

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-model-on - npm Package Compare versions

Comparing version 1.0.0 to 1.0.2

dist/vue-model-on.js

5

package.json
{
"name": "vue-model-on",
"version": "1.0.0",
"version": "1.0.2",
"description": "Allows you to set the event type when binding model data in Vue.js",

@@ -29,3 +29,4 @@ "main": "src/vue-model-on.js",

"umd",
"src"
"src",
"dist"
],

@@ -32,0 +33,0 @@ "author": "Craig Humphreys",

26

README.md

@@ -1,8 +0,26 @@

# vue-model-on
# vue-model-on for Vue 2.x
Allows you to set the event type for the vue.js `v-model` directive.
By default Vue's `v-model` uses the `input` event to update the underlying model data, `vue-model-on` is a simple directive that allows you to set the event type for updating model data in Vue.js. Simply use `v-model-on:event="myVar"` instead of `v-model="myVar"`
## Install
Install via `npm`:
`npm install vue-model-on --save-dev`
Then simply use `require`:
`require('vue-model-on')`
or import for `ES6` syntax:
`import "vue-model-on"`
Also available via CDN on unpkg, simply add the following to your page:
`<script src="https://unpkg.com/vue-model-on@1.0.0" ></script>`
## Example
The following will update myVar on blur event, although you may use any javascript event you want to:
The following will update `myVar` on `blur` event, although you may use any javascript event you want to:

@@ -25,4 +43,6 @@ **HTML**

[Check it out on JSFiddle](https://jsfiddle.net/b20jk7po/)
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