react-input-mask
Advanced tools
Comparing version 0.3.1 to 0.3.3
@@ -5,2 +5,4 @@ "use strict"; | ||
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } | ||
// https://github.com/sanniassin/react-input-mask | ||
@@ -15,3 +17,3 @@ | ||
"9": "[0-9]", | ||
a: "[A-Za-z]", | ||
"a": "[A-Za-z]", | ||
"*": "[A-Za-z0-9]" | ||
@@ -29,3 +31,3 @@ }, | ||
isDOMElement: function isDOMElement(element) { | ||
return typeof HTMLElement === "object" ? element instanceof HTMLElement // DOM2 | ||
return (typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === "object" ? element instanceof HTMLElement // DOM2 | ||
: element.nodeType === 1 && typeof element.nodeName === "string"; | ||
@@ -57,3 +59,3 @@ }, | ||
getFilledLength: function getFilledLength() { | ||
var value = arguments[0] === undefined ? this.state.value : arguments[0]; | ||
var value = arguments.length <= 0 || arguments[0] === undefined ? this.state.value : arguments[0]; | ||
@@ -96,3 +98,3 @@ var i; | ||
var value = arguments[0] === undefined ? this.state.value : arguments[0]; | ||
var value = arguments.length <= 0 || arguments[0] === undefined ? this.state.value : arguments[0]; | ||
@@ -104,3 +106,3 @@ return !value.split("").some(function (char, i) { | ||
isFilled: function isFilled() { | ||
var value = arguments[0] === undefined ? this.state.value : arguments[0]; | ||
var value = arguments.length <= 0 || arguments[0] === undefined ? this.state.value : arguments[0]; | ||
@@ -383,2 +385,5 @@ return this.getFilledLength(value) === this.state.mask.length; | ||
var mask = this.state.mask; | ||
if (!mask) { | ||
return; | ||
} | ||
var isMaskChanged = mask && mask !== prevState.mask; | ||
@@ -607,3 +612,8 @@ var pos = this.lastCaretPos; | ||
} | ||
return React.createElement("input", _extends({ ref: "input" }, this.props, ourProps)); | ||
return React.createElement("input", _extends({ ref: "input" }, this.props, ourProps, { | ||
__source: { | ||
fileName: "../../../InputElement.js", | ||
lineNumber: 592 | ||
} | ||
})); | ||
} | ||
@@ -610,0 +620,0 @@ }); |
@@ -367,2 +367,5 @@ // https://github.com/sanniassin/react-input-mask | ||
var mask = this.state.mask; | ||
if (!mask) { | ||
return; | ||
} | ||
var isMaskChanged = mask && mask !== prevState.mask; | ||
@@ -369,0 +372,0 @@ var pos = this.lastCaretPos; |
{ | ||
"name": "react-input-mask", | ||
"description": "Masked input component for React", | ||
"version": "0.3.1", | ||
"version": "0.3.3", | ||
"homepage": "https://github.com/sanniassin/react-input-mask", | ||
@@ -15,5 +15,10 @@ "license": "MIT", | ||
], | ||
"peerDependencies": { | ||
"react": ">=0.12.0" | ||
}, | ||
"devDependencies": { | ||
"react": ">=0.12.0", | ||
"babel": ">=5.0" | ||
"babel-cli": "^6.1.4", | ||
"babel-preset-es2015": "^6.1.2", | ||
"babel-preset-react": "^6.1.2", | ||
"babel-preset-stage-2": "^6.1.2" | ||
}, | ||
@@ -20,0 +25,0 @@ "main": "build/InputElement.js", |
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
43021
6
1123
1
4