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 1.0.2 to 1.0.3

34

index.js

@@ -1,22 +0,30 @@

'use strict'
'use strict';
import VMasker from 'vanilla-masker'
Object.defineProperty(exports, "__esModule", {
value: true
});
let mask = {};
var _vanillaMasker = require('vanilla-masker');
let inputHandler = (ev) => {
ev.target.value = mask ? VMasker.toPattern(ev.target.value, mask) : ev.target.value
}
var _vanillaMasker2 = _interopRequireDefault(_vanillaMasker);
export default {
bind (el, binding) {
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mask = {};
var inputHandler = function inputHandler(ev) {
ev.target.value = mask ? _vanillaMasker2.default.toPattern(ev.target.value, mask) : ev.target.value;
};
exports.default = {
bind: function bind(el, binding) {
mask = binding.expression;
el.addEventListener('input', inputHandler)
el.addEventListener('input', inputHandler);
},
update (el, binding) {
update: function update(el, binding) {
mask = binding.expression;
},
unbind(el) {
el.addEventListener('input', inputHandler)
unbind: function unbind(el) {
el.addEventListener('input', inputHandler);
}
}
};
{
"name": "awesome-mask",
"version": "1.0.2",
"version": "1.0.3",
"description": "An awesome mask directive for Vue.js using vanilla-masker from `https://github.com/BankFacil/vanilla-masker`",
"main": "N",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "babel src --presets babel-preset-es2015 --out-dir . "
},

@@ -29,3 +30,6 @@ "dependencies": {

],
"main": "index.js"
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-preset-es2015": "^6.18.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