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

awesome-mask

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awesome-mask - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

18

index.js

@@ -18,3 +18,3 @@ 'use strict';

var isCharacter = (0, _isCharacterKeypress.isCharacterKeyPress)(ev) && ev.keyCode !== 9;
if (isCharacter && ev.target.value.length >= ev.target.dataset.mask.length) {
if (isCharacter && ev.target.value.length >= mask.length) {
ev.preventDefault();

@@ -27,10 +27,14 @@ }

bind: function bind(el, binding) {
el.dataset.mask = binding.value;
el.setAttribute("maxlength", el.dataset.mask.length);
el.addEventListener('keydown', inputHandler);
if (binding.value !== '') {
el.dataset.mask = binding.value;
el.setAttribute('maxlength', el.dataset.mask.length);
el.addEventListener('keydown', inputHandler);
}
},
unbind: function unbind(el) {
el.removeAttribute("maxlength");
el.removeEventListener('keydown', inputHandler);
unbind: function unbind(el, binding) {
if (binding.value !== '') {
el.removeAttribute('maxlength');
el.removeEventListener('keydown', inputHandler);
}
}
};
{
"name": "awesome-mask",
"version": "0.2.4",
"version": "0.2.5",
"description": "An awesome mask directive for Vue.js using vanilla-masker from `https://github.com/BankFacil/vanilla-masker`",

@@ -5,0 +5,0 @@ "main": "index.js",

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