mimir-ui-kit 1.38.16 → 1.38.17
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
|
|
1
1
|
const n = (s) => {
|
2
|
-
const t = s.replace(/\D/g, "");
|
2
|
+
const t = (s ?? "").replace(/\D/g, "");
|
3
3
|
let e = "+7 ";
|
4
4
|
return t.startsWith("7") ? e += "(" + t.substring(1, 4) : e += t.substring(0, 3), t.length > 4 && (e += ") " + t.substring(4, 7)), t.length > 7 && (e += "-" + t.substring(7, 9)), t.length > 9 && (e += "-" + t.substring(9, 11)), e;
|
5
|
-
}, r = (s) => s.replace(/\D/g, "");
|
5
|
+
}, r = (s) => (s ?? "").replace(/\D/g, "");
|
6
6
|
export {
|
7
7
|
n as getMaskedInputPhoneValue,
|
8
8
|
r as getUnmaskedInputValue
|