@tadashi/mask
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -47,3 +47,3 @@ (function (global, factory) { | ||
constructor(input, mask = '') { | ||
constructor(input, mask = '', keyEvent = 'input') { | ||
if (input instanceof HTMLInputElement === false) { | ||
@@ -68,3 +68,3 @@ throw new TypeError('The input should be a HTMLInputElement') | ||
// Listener | ||
this[EVENT] = 'input'; | ||
this[EVENT] = keyEvent; | ||
this.input.addEventListener(this[EVENT], this); | ||
@@ -71,0 +71,0 @@ |
{ | ||
"name": "@tadashi/mask", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "The simple and tiny script for input mask", | ||
@@ -24,4 +24,4 @@ "keywords": [ | ||
"report": "nyc report --reporter=text-lcov | coveralls", | ||
"pretest": "xo", | ||
"test": "ava", | ||
"pretest": "npx xo", | ||
"test": "ava --serial", | ||
"rollup": "rollup -c", | ||
@@ -72,6 +72,5 @@ "prebuild": "npm test", | ||
"jsdom": "15.1.1", | ||
"rollup": "1.16.7", | ||
"simulant": "0.2.2", | ||
"xo": "0.24.0" | ||
"rollup": "1.17.0", | ||
"simulant": "0.2.2" | ||
} | ||
} |
@@ -43,3 +43,3 @@ 'use strict' | ||
constructor(input, mask = '') { | ||
constructor(input, mask = '', keyEvent = 'input') { | ||
if (input instanceof HTMLInputElement === false) { | ||
@@ -64,3 +64,3 @@ throw new TypeError('The input should be a HTMLInputElement') | ||
// Listener | ||
this[EVENT] = 'input' | ||
this[EVENT] = keyEvent | ||
this.input.addEventListener(this[EVENT], this) | ||
@@ -67,0 +67,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12982
5
0