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

react-input-mask

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-input-mask - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

9

build/InputElement.js

@@ -84,2 +84,9 @@ "use strict";

},
createFilledArray: function createFilledArray(length, val) {
var array = [];
for (var i = 0; i < length; i++) {
array[i] = val;
}
return array;
},
formatValue: function formatValue(value, newState) {

@@ -101,3 +108,3 @@ var _this2 = this;

}
return value.split("").concat(Array.apply(null, Array(mask.length - value.length))).map(function (char, pos) {
return value.split("").concat(this.createFilledArray(mask.length - value.length, null)).map(function (char, pos) {
if (_this2.isAllowedChar(char, pos, newState)) {

@@ -104,0 +111,0 @@ return char;

@@ -77,2 +77,9 @@ // https://github.com/sanniassin/react-input-mask

},
createFilledArray: function(length, val) {
var array = [];
for (var i = 0; i < length; i++) {
array[i] = val;
}
return array;
},
formatValue: function(value, newState) {

@@ -89,3 +96,3 @@ var { maskChar, mask } = newState || this.state;

return value.split("")
.concat(Array.apply(null, Array(mask.length - value.length)))
.concat(this.createFilledArray(mask.length - value.length, null))
.map((char, pos) => {

@@ -92,0 +99,0 @@ if (this.isAllowedChar(char, pos, newState)) {

2

package.json
{
"name": "react-input-mask",
"description": "Masked input component for React",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://github.com/sanniassin/react-input-mask",

@@ -6,0 +6,0 @@ "license": "MIT",

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