kui-utils 0.0.32 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +3 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ declare const getNestedData: (data: any, key: string) => any;
|
|
|
61
61
|
|
|
62
62
|
declare const getPhoneNumberFromPhoneParams: ({ phoneCode, phoneNumber }: PhoneParams, fill?: string | undefined) => string;
|
|
63
63
|
|
|
64
|
-
declare const getPhoneParamsFromString: (phone
|
|
64
|
+
declare const getPhoneParamsFromString: (phone?: string | null | undefined) => PhoneParams | null;
|
|
65
65
|
|
|
66
66
|
declare const promisesWithCallback: (promises: Promise<any>[], callback?: Function | undefined) => Promise<PromiseSettledResult<any>[]>;
|
|
67
67
|
|
package/index.js
CHANGED
|
@@ -672,7 +672,7 @@ var countries = [
|
|
|
672
672
|
nameCode: "hr",
|
|
673
673
|
nameRus: "Хорватия",
|
|
674
674
|
phoneCode: "385",
|
|
675
|
-
mask: "-00-000-
|
|
675
|
+
mask: "-00-000-0000",
|
|
676
676
|
},
|
|
677
677
|
{
|
|
678
678
|
name: "Cuba",
|
|
@@ -1942,6 +1942,8 @@ var getPhoneNumberFromPhoneParams = function (_a, fill) {
|
|
|
1942
1942
|
|
|
1943
1943
|
var getPhoneParamsFromString = function (phone) {
|
|
1944
1944
|
var _a;
|
|
1945
|
+
if (!phone)
|
|
1946
|
+
return null;
|
|
1945
1947
|
var formattedPhone = phone.replace(/\D/g, "");
|
|
1946
1948
|
var phoneDigits = formattedPhone.split("");
|
|
1947
1949
|
var phoneCode = ((_a = __spreadArray([], countries, true).find(function (country) {
|