Socket
Socket
Sign inDemoInstall

@tadashi/mask

Package Overview
Dependencies
0
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

19

dist/index.js

@@ -27,12 +27,13 @@ let _cc = 0;

const char = mask.charAt(i);
if (map.has(char) === false) {
res.push(char);
continue
if (value.length > cc) {
if (map.has(char)) {
if (map.get(char).test(value.charAt(cc))) {
res.push(value.charAt(cc++));
} else {
break
}
} else {
res.push(char);
}
}
if (value.length > cc && map.get(char).test(value.charAt(cc))) {
res.push(value.charAt(cc++));
} else {
break
}
}

@@ -39,0 +40,0 @@

@@ -32,12 +32,13 @@ (function (global, factory) {

const char = mask.charAt(i);
if (map.has(char) === false) {
res.push(char);
continue
if (value.length > cc) {
if (map.has(char)) {
if (map.get(char).test(value.charAt(cc))) {
res.push(value.charAt(cc++));
} else {
break
}
} else {
res.push(char);
}
}
if (value.length > cc && map.get(char).test(value.charAt(cc))) {
res.push(value.charAt(cc++));
} else {
break
}
}

@@ -44,0 +45,0 @@

{
"name": "@tadashi/mask",
"version": "2.0.0",
"version": "2.0.1",
"description": "The simple and tiny script for input mask",

@@ -5,0 +5,0 @@ "keywords": [

@@ -29,12 +29,13 @@ 'use strict'

const char = mask.charAt(i)
if (map.has(char) === false) {
res.push(char)
continue
if (value.length > cc) {
if (map.has(char)) {
if (map.get(char).test(value.charAt(cc))) {
res.push(value.charAt(cc++))
} else {
break
}
} else {
res.push(char)
}
}
if (value.length > cc && map.get(char).test(value.charAt(cc))) {
res.push(value.charAt(cc++))
} else {
break
}
}

@@ -41,0 +42,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc