react-input-mask
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -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)) { |
{ | ||
"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", |
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
37386
991