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.8 to 0.2.9

10

index.js

@@ -15,5 +15,13 @@ 'use strict';

var allowedKeys = [9, // 'tab'
37, // 'left'
38, // 'up'
39, // 'right'
40];
var inputHandler = function inputHandler(ev) {
var mask = ev.target.dataset.mask;
var isCharacter = (0, _isCharacterKeypress.isCharacterKeyPress)(ev) && ev.keyCode !== 9;
var isCharacter = (0, _isCharacterKeypress.isCharacterKeyPress)(ev);
var isAllowedKey = allowedKeys.indexOf(ev.keyCode) > -1;
if (isAllowedKey) return;
if (isCharacter && ev.target.value.length >= mask.length) {

@@ -20,0 +28,0 @@ ev.preventDefault();

2

package.json
{
"name": "awesome-mask",
"version": "0.2.8",
"version": "0.2.9",
"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