utilitify-core 1.0.0
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/LICENSE +21 -0
- package/README.md +338 -0
- package/dist/async.cjs +25 -0
- package/dist/async.cjs.map +1 -0
- package/dist/async.d.cts +104 -0
- package/dist/async.d.ts +104 -0
- package/dist/async.js +4 -0
- package/dist/async.js.map +1 -0
- package/dist/chunk-2ICNRTSN.cjs +346 -0
- package/dist/chunk-2ICNRTSN.cjs.map +1 -0
- package/dist/chunk-3DPF72DY.js +170 -0
- package/dist/chunk-3DPF72DY.js.map +1 -0
- package/dist/chunk-4CV4JOE5.js +24 -0
- package/dist/chunk-4CV4JOE5.js.map +1 -0
- package/dist/chunk-4SLYNSLH.cjs +783 -0
- package/dist/chunk-4SLYNSLH.cjs.map +1 -0
- package/dist/chunk-5WP7DWCG.js +1285 -0
- package/dist/chunk-5WP7DWCG.js.map +1 -0
- package/dist/chunk-BMQ6YPKV.js +876 -0
- package/dist/chunk-BMQ6YPKV.js.map +1 -0
- package/dist/chunk-BZCMWUKS.cjs +479 -0
- package/dist/chunk-BZCMWUKS.cjs.map +1 -0
- package/dist/chunk-C5R744DY.cjs +173 -0
- package/dist/chunk-C5R744DY.cjs.map +1 -0
- package/dist/chunk-C75J62CV.cjs +913 -0
- package/dist/chunk-C75J62CV.cjs.map +1 -0
- package/dist/chunk-CZLDE2OZ.cjs +28 -0
- package/dist/chunk-CZLDE2OZ.cjs.map +1 -0
- package/dist/chunk-DSMB6AF6.cjs +193 -0
- package/dist/chunk-DSMB6AF6.cjs.map +1 -0
- package/dist/chunk-ETWGPOPY.js +426 -0
- package/dist/chunk-ETWGPOPY.js.map +1 -0
- package/dist/chunk-FQBPVN63.cjs +403 -0
- package/dist/chunk-FQBPVN63.cjs.map +1 -0
- package/dist/chunk-G4GYQGTW.cjs +178 -0
- package/dist/chunk-G4GYQGTW.cjs.map +1 -0
- package/dist/chunk-GFDMZDMI.js +486 -0
- package/dist/chunk-GFDMZDMI.js.map +1 -0
- package/dist/chunk-HOTOYIPB.js +171 -0
- package/dist/chunk-HOTOYIPB.js.map +1 -0
- package/dist/chunk-HYADH4ZX.js +176 -0
- package/dist/chunk-HYADH4ZX.js.map +1 -0
- package/dist/chunk-JBN7C5WE.js +255 -0
- package/dist/chunk-JBN7C5WE.js.map +1 -0
- package/dist/chunk-JNCTPFTD.cjs +25 -0
- package/dist/chunk-JNCTPFTD.cjs.map +1 -0
- package/dist/chunk-N3BH3BV7.js +21 -0
- package/dist/chunk-N3BH3BV7.js.map +1 -0
- package/dist/chunk-NFPGAVRQ.js +749 -0
- package/dist/chunk-NFPGAVRQ.js.map +1 -0
- package/dist/chunk-OFFRGRBN.cjs +1332 -0
- package/dist/chunk-OFFRGRBN.cjs.map +1 -0
- package/dist/chunk-OZLKYIZL.cjs +490 -0
- package/dist/chunk-OZLKYIZL.cjs.map +1 -0
- package/dist/chunk-P3NUK46X.js +145 -0
- package/dist/chunk-P3NUK46X.js.map +1 -0
- package/dist/chunk-P7P2B7ZI.cjs +429 -0
- package/dist/chunk-P7P2B7ZI.cjs.map +1 -0
- package/dist/chunk-PB6SKSJN.cjs +150 -0
- package/dist/chunk-PB6SKSJN.cjs.map +1 -0
- package/dist/chunk-R3IXCJR7.js +378 -0
- package/dist/chunk-R3IXCJR7.js.map +1 -0
- package/dist/chunk-SD6P3WEJ.js +324 -0
- package/dist/chunk-SD6P3WEJ.js.map +1 -0
- package/dist/chunk-YSCHP26P.js +451 -0
- package/dist/chunk-YSCHP26P.js.map +1 -0
- package/dist/chunk-ZLMPRPCY.cjs +274 -0
- package/dist/chunk-ZLMPRPCY.cjs.map +1 -0
- package/dist/common-CBDYNJeh.d.cts +48 -0
- package/dist/common-CBDYNJeh.d.ts +48 -0
- package/dist/constants.cjs +42 -0
- package/dist/constants.cjs.map +1 -0
- package/dist/constants.d.cts +60 -0
- package/dist/constants.d.ts +60 -0
- package/dist/constants.js +5 -0
- package/dist/constants.js.map +1 -0
- package/dist/country/index.cjs +154 -0
- package/dist/country/index.cjs.map +1 -0
- package/dist/country/index.d.cts +1 -0
- package/dist/country/index.d.ts +1 -0
- package/dist/country/index.js +5 -0
- package/dist/country/index.js.map +1 -0
- package/dist/date/index.cjs +117 -0
- package/dist/date/index.cjs.map +1 -0
- package/dist/date/index.d.cts +283 -0
- package/dist/date/index.d.ts +283 -0
- package/dist/date/index.js +4 -0
- package/dist/date/index.js.map +1 -0
- package/dist/environment/index.cjs +73 -0
- package/dist/environment/index.cjs.map +1 -0
- package/dist/environment/index.d.cts +127 -0
- package/dist/environment/index.d.ts +127 -0
- package/dist/environment/index.js +4 -0
- package/dist/environment/index.js.map +1 -0
- package/dist/form/index.cjs +81 -0
- package/dist/form/index.cjs.map +1 -0
- package/dist/form/index.d.cts +227 -0
- package/dist/form/index.d.ts +227 -0
- package/dist/form/index.js +4 -0
- package/dist/form/index.js.map +1 -0
- package/dist/i18n.cjs +37 -0
- package/dist/i18n.cjs.map +1 -0
- package/dist/i18n.d.cts +102 -0
- package/dist/i18n.d.ts +102 -0
- package/dist/i18n.js +4 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index-BXBmBHyL.d.ts +718 -0
- package/dist/index-BYsUCP3u.d.cts +718 -0
- package/dist/index-Cl26FrAZ.d.cts +362 -0
- package/dist/index-Cl26FrAZ.d.ts +362 -0
- package/dist/index.cjs +1265 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +205 -0
- package/dist/index.d.ts +205 -0
- package/dist/index.js +277 -0
- package/dist/index.js.map +1 -0
- package/dist/schema.cjs +13 -0
- package/dist/schema.cjs.map +1 -0
- package/dist/schema.d.cts +84 -0
- package/dist/schema.d.ts +84 -0
- package/dist/schema.js +4 -0
- package/dist/schema.js.map +1 -0
- package/dist/security/index.cjs +94 -0
- package/dist/security/index.cjs.map +1 -0
- package/dist/security/index.d.cts +216 -0
- package/dist/security/index.d.ts +216 -0
- package/dist/security/index.js +5 -0
- package/dist/security/index.js.map +1 -0
- package/dist/string/index.cjs +153 -0
- package/dist/string/index.cjs.map +1 -0
- package/dist/string/index.d.cts +471 -0
- package/dist/string/index.d.ts +471 -0
- package/dist/string/index.js +4 -0
- package/dist/string/index.js.map +1 -0
- package/dist/transform/index.cjs +105 -0
- package/dist/transform/index.cjs.map +1 -0
- package/dist/transform/index.d.cts +271 -0
- package/dist/transform/index.d.ts +271 -0
- package/dist/transform/index.js +4 -0
- package/dist/transform/index.js.map +1 -0
- package/dist/validators/index.cjs +195 -0
- package/dist/validators/index.cjs.map +1 -0
- package/dist/validators/index.d.cts +2 -0
- package/dist/validators/index.d.ts +2 -0
- package/dist/validators/index.js +6 -0
- package/dist/validators/index.js.map +1 -0
- package/package.json +229 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Country information interface
|
|
3
|
+
*/
|
|
4
|
+
interface Country {
|
|
5
|
+
/** Country name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Official country name */
|
|
8
|
+
officialName?: string;
|
|
9
|
+
/** ISO 3166-1 alpha-2 code */
|
|
10
|
+
alpha2: string;
|
|
11
|
+
/** ISO 3166-1 alpha-3 code */
|
|
12
|
+
alpha3: string;
|
|
13
|
+
/** ISO 3166-1 numeric code */
|
|
14
|
+
numeric: string;
|
|
15
|
+
/** Continent */
|
|
16
|
+
continent: string;
|
|
17
|
+
/** Capital city */
|
|
18
|
+
capital?: string;
|
|
19
|
+
/** Languages spoken */
|
|
20
|
+
languages: string[];
|
|
21
|
+
/** Currency code */
|
|
22
|
+
currency: string;
|
|
23
|
+
/** Dialing code */
|
|
24
|
+
dialCode: string;
|
|
25
|
+
/** Flag emoji */
|
|
26
|
+
flag: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Currency information
|
|
30
|
+
*/
|
|
31
|
+
interface CurrencyInfo {
|
|
32
|
+
/** ISO 4217 currency code */
|
|
33
|
+
code: string;
|
|
34
|
+
/** Currency symbol */
|
|
35
|
+
symbol: string;
|
|
36
|
+
/** Currency name */
|
|
37
|
+
name: string;
|
|
38
|
+
/** Number of decimal places */
|
|
39
|
+
decimals: number;
|
|
40
|
+
/** Symbol position */
|
|
41
|
+
symbolPosition: 'before' | 'after';
|
|
42
|
+
/** Thousands separator */
|
|
43
|
+
thousandsSeparator: string;
|
|
44
|
+
/** Decimal separator */
|
|
45
|
+
decimalSeparator: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Timezone information
|
|
49
|
+
*/
|
|
50
|
+
interface TimezoneInfo {
|
|
51
|
+
/** IANA timezone name */
|
|
52
|
+
name: string;
|
|
53
|
+
/** UTC offset in hours */
|
|
54
|
+
offset: number;
|
|
55
|
+
/** UTC offset string (e.g., "+05:00") */
|
|
56
|
+
offsetString: string;
|
|
57
|
+
/** Whether DST is currently active */
|
|
58
|
+
isDST: boolean;
|
|
59
|
+
/** Abbreviation (e.g., "PST", "EST") */
|
|
60
|
+
abbreviation: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Phone format information by country
|
|
64
|
+
*/
|
|
65
|
+
interface PhoneFormat {
|
|
66
|
+
/** Country code */
|
|
67
|
+
countryCode: string;
|
|
68
|
+
/** Dialing code with + */
|
|
69
|
+
dialCode: string;
|
|
70
|
+
/** National number length(s) */
|
|
71
|
+
lengths: number[];
|
|
72
|
+
/** Mobile prefixes */
|
|
73
|
+
mobilePrefixes: string[];
|
|
74
|
+
/** Landline prefixes */
|
|
75
|
+
landlinePrefixes: string[];
|
|
76
|
+
/** Format pattern */
|
|
77
|
+
pattern: string;
|
|
78
|
+
/** Example number */
|
|
79
|
+
example: string;
|
|
80
|
+
/** Area codes for NANP countries (US, Canada, Caribbean) */
|
|
81
|
+
areaCodes?: string[];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Country code conversion types
|
|
85
|
+
*/
|
|
86
|
+
type CountryCodeFormat = 'alpha2' | 'alpha3' | 'numeric';
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Get country by alpha-2 code (e.g., "US", "PK")
|
|
90
|
+
*
|
|
91
|
+
* @param code - ISO 3166-1 alpha-2 code
|
|
92
|
+
* @returns Country or null
|
|
93
|
+
*/
|
|
94
|
+
declare function getCountryByAlpha2(code: string): Country | null;
|
|
95
|
+
/**
|
|
96
|
+
* Get country by alpha-3 code (e.g., "USA", "PAK")
|
|
97
|
+
*
|
|
98
|
+
* @param code - ISO 3166-1 alpha-3 code
|
|
99
|
+
* @returns Country or null
|
|
100
|
+
*/
|
|
101
|
+
declare function getCountryByAlpha3(code: string): Country | null;
|
|
102
|
+
/**
|
|
103
|
+
* Get country by numeric code (e.g., "840", "586")
|
|
104
|
+
*
|
|
105
|
+
* @param code - ISO 3166-1 numeric code
|
|
106
|
+
* @returns Country or null
|
|
107
|
+
*/
|
|
108
|
+
declare function getCountryByNumeric(code: string | number): Country | null;
|
|
109
|
+
/**
|
|
110
|
+
* Get country by any code format (alpha-2, alpha-3, or numeric)
|
|
111
|
+
*
|
|
112
|
+
* @param code - Country code in any format (e.g., 'US', 'USA', '840')
|
|
113
|
+
* @returns Country object with details or null if not found
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* getCountry('US'); // returns { name: 'United States', ... }
|
|
118
|
+
* getCountry('USA'); // returns { name: 'United States', ... }
|
|
119
|
+
* getCountry(840); // returns { name: 'United States', ... }
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
declare function getCountry(code: string | number): Country | null;
|
|
123
|
+
/**
|
|
124
|
+
* Convert country code between formats
|
|
125
|
+
*
|
|
126
|
+
* @param code - Source country code
|
|
127
|
+
* @param to - Target format
|
|
128
|
+
* @returns Converted code or null
|
|
129
|
+
*/
|
|
130
|
+
declare function convertCountryCode(code: string | number, to: CountryCodeFormat): string | null;
|
|
131
|
+
/**
|
|
132
|
+
* Get all countries
|
|
133
|
+
*
|
|
134
|
+
* @returns Array of all countries
|
|
135
|
+
*/
|
|
136
|
+
declare function getAllCountries(): Country[];
|
|
137
|
+
/**
|
|
138
|
+
* Get countries by continent
|
|
139
|
+
*
|
|
140
|
+
* @param continent - Continent name
|
|
141
|
+
* @returns Array of countries
|
|
142
|
+
*/
|
|
143
|
+
declare function getCountriesByContinent(continent: string): Country[];
|
|
144
|
+
/**
|
|
145
|
+
* Get countries by language
|
|
146
|
+
*
|
|
147
|
+
* @param language - Language code
|
|
148
|
+
* @returns Array of countries
|
|
149
|
+
*/
|
|
150
|
+
declare function getCountriesByLanguage(language: string): Country[];
|
|
151
|
+
/**
|
|
152
|
+
* Search countries by name
|
|
153
|
+
*
|
|
154
|
+
* @param query - Search query
|
|
155
|
+
* @returns Array of matching countries
|
|
156
|
+
*/
|
|
157
|
+
declare function searchCountries(query: string): Country[];
|
|
158
|
+
/**
|
|
159
|
+
* Check if country code is valid
|
|
160
|
+
*
|
|
161
|
+
* @param code - Country code
|
|
162
|
+
* @returns true if valid
|
|
163
|
+
*/
|
|
164
|
+
declare function isValidCountryCode(code: string | number): boolean;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Get all timezones for a country
|
|
168
|
+
*
|
|
169
|
+
* @param countryCode - ISO country code
|
|
170
|
+
* @returns Array of timezone names
|
|
171
|
+
*/
|
|
172
|
+
declare function getTimezonesByCountry(countryCode: string): string[];
|
|
173
|
+
/**
|
|
174
|
+
* Get default timezone for a country
|
|
175
|
+
*
|
|
176
|
+
* @param countryCode - ISO country code
|
|
177
|
+
* @returns Default timezone or null
|
|
178
|
+
*/
|
|
179
|
+
declare function getDefaultTimezone(countryCode: string): string | null;
|
|
180
|
+
/**
|
|
181
|
+
* Get current time in a country's timezone
|
|
182
|
+
*
|
|
183
|
+
* @param countryCode - ISO country code
|
|
184
|
+
* @returns Date in country's timezone
|
|
185
|
+
*/
|
|
186
|
+
declare function getCurrentTimeInCountry(countryCode: string): Date | null;
|
|
187
|
+
/**
|
|
188
|
+
* Get timezone offset for a country
|
|
189
|
+
*
|
|
190
|
+
* @param countryCode - ISO country code
|
|
191
|
+
* @returns Offset string (e.g., "+05:00") or null
|
|
192
|
+
*/
|
|
193
|
+
declare function getTimezoneOffset(countryCode: string): string | null;
|
|
194
|
+
/**
|
|
195
|
+
* Convert time between timezones
|
|
196
|
+
*
|
|
197
|
+
* @param date - Date to convert
|
|
198
|
+
* @param fromCountry - Source country code
|
|
199
|
+
* @param toCountry - Target country code
|
|
200
|
+
* @returns Converted date or null
|
|
201
|
+
*/
|
|
202
|
+
declare function convertTimeBetweenCountries(date: Date, _fromCountry: string, toCountry: string): Date | null;
|
|
203
|
+
/**
|
|
204
|
+
* Format time for a specific timezone
|
|
205
|
+
*
|
|
206
|
+
* @param date - Date to format
|
|
207
|
+
* @param countryCode - Country code
|
|
208
|
+
* @param options - Intl.DateTimeFormat options
|
|
209
|
+
* @returns Formatted time string
|
|
210
|
+
*/
|
|
211
|
+
declare function formatTimeForCountry(date: Date, countryCode: string, options?: Partial<Intl.DateTimeFormatOptions>): string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Get currency info by currency code
|
|
215
|
+
*
|
|
216
|
+
* @param currencyCode - ISO 4217 currency code
|
|
217
|
+
* @returns Currency info or null
|
|
218
|
+
*/
|
|
219
|
+
declare function getCurrency(currencyCode: string): CurrencyInfo | null;
|
|
220
|
+
/**
|
|
221
|
+
* Get currency by country code
|
|
222
|
+
*
|
|
223
|
+
* @param countryCode - ISO country code
|
|
224
|
+
* @returns Currency info or null
|
|
225
|
+
*/
|
|
226
|
+
declare function getCurrencyByCountry(countryCode: string): CurrencyInfo | null;
|
|
227
|
+
/**
|
|
228
|
+
* Format currency amount
|
|
229
|
+
*
|
|
230
|
+
* @param amount - Amount to format
|
|
231
|
+
* @param currencyCode - Currency code or country code
|
|
232
|
+
* @returns Formatted currency string
|
|
233
|
+
*/
|
|
234
|
+
declare function formatCurrency(amount: number, currencyCode: string): string;
|
|
235
|
+
/**
|
|
236
|
+
* Parse currency string to number
|
|
237
|
+
*
|
|
238
|
+
* @param value - Currency string
|
|
239
|
+
* @param currencyCode - Currency code
|
|
240
|
+
* @returns Parsed number or NaN
|
|
241
|
+
*/
|
|
242
|
+
declare function parseCurrency(value: string, currencyCode: string): number;
|
|
243
|
+
/**
|
|
244
|
+
* Get all supported currencies
|
|
245
|
+
*
|
|
246
|
+
* @returns Array of currency info
|
|
247
|
+
*/
|
|
248
|
+
declare function getAllCurrencies(): CurrencyInfo[];
|
|
249
|
+
/**
|
|
250
|
+
* Get currency symbol
|
|
251
|
+
*
|
|
252
|
+
* @param currencyCode - Currency code
|
|
253
|
+
* @returns Symbol or null
|
|
254
|
+
*/
|
|
255
|
+
declare function getCurrencySymbol(currencyCode: string): string | null;
|
|
256
|
+
/**
|
|
257
|
+
* Convert amount between currencies (requires exchange rate)
|
|
258
|
+
*
|
|
259
|
+
* @param amount - Amount to convert
|
|
260
|
+
* @param fromCurrency - Source currency code
|
|
261
|
+
* @param toCurrency - Target currency code
|
|
262
|
+
* @param exchangeRate - Exchange rate (from -> to)
|
|
263
|
+
* @returns Converted amount
|
|
264
|
+
*/
|
|
265
|
+
declare function convertCurrency(amount: number, _fromCurrency: string, toCurrency: string, exchangeRate: number): number;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Get flag emoji for a country code
|
|
269
|
+
*
|
|
270
|
+
* @param countryCode - ISO alpha-2 country code
|
|
271
|
+
* @returns Flag emoji or null if invalid
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* ```typescript
|
|
275
|
+
* getFlagEmoji('US'); // 'πΊπΈ'
|
|
276
|
+
* getFlagEmoji('PK'); // 'π΅π°'
|
|
277
|
+
* ```
|
|
278
|
+
*/
|
|
279
|
+
declare function getFlagEmoji(countryCode: string): string | null;
|
|
280
|
+
/**
|
|
281
|
+
* Get country code from flag emoji
|
|
282
|
+
*
|
|
283
|
+
* @param emoji - Flag emoji
|
|
284
|
+
* @returns ISO alpha-2 country code or null
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* ```typescript
|
|
288
|
+
* getCountryFromEmoji('πΊπΈ'); // 'US'
|
|
289
|
+
* getCountryFromEmoji('π΅π°'); // 'PK'
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
declare function getCountryFromEmoji(emoji: string): string | null;
|
|
293
|
+
/**
|
|
294
|
+
* Check if string is a valid flag emoji
|
|
295
|
+
*
|
|
296
|
+
* @param str - String to check
|
|
297
|
+
* @returns true if valid flag emoji
|
|
298
|
+
*/
|
|
299
|
+
declare function isFlagEmoji(str: string): boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Get all flag emojis
|
|
302
|
+
*
|
|
303
|
+
* @returns Record of country code to flag emoji
|
|
304
|
+
*/
|
|
305
|
+
declare function getAllFlags(): Record<string, string>;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Get dialing code for a country
|
|
309
|
+
*
|
|
310
|
+
* @param countryCode - ISO alpha-2 country code
|
|
311
|
+
* @returns Dialing code (e.g., "+1", "+92") or null
|
|
312
|
+
*/
|
|
313
|
+
declare function getDialingCode(countryCode: string): string | null;
|
|
314
|
+
/**
|
|
315
|
+
* Get country code from dialing code
|
|
316
|
+
*
|
|
317
|
+
* @param dialCode - Dialing code (with or without +)
|
|
318
|
+
* @returns Array of possible country codes
|
|
319
|
+
*/
|
|
320
|
+
declare function getCountriesByDialingCode(dialCode: string): string[];
|
|
321
|
+
/**
|
|
322
|
+
* Format phone number with dialing code
|
|
323
|
+
*
|
|
324
|
+
* @param nationalNumber - National phone number
|
|
325
|
+
* @param countryCode - ISO country code
|
|
326
|
+
* @returns Formatted international number
|
|
327
|
+
*/
|
|
328
|
+
declare function formatWithDialingCode(nationalNumber: string, countryCode: string): string;
|
|
329
|
+
/**
|
|
330
|
+
* Check if phone number includes valid dialing code
|
|
331
|
+
*
|
|
332
|
+
* @param phone - Phone number
|
|
333
|
+
* @returns true if has valid dialing code
|
|
334
|
+
*/
|
|
335
|
+
declare function hasValidDialingCode(phone: string): boolean;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Comprehensive country data - ISO 3166-1
|
|
339
|
+
* Includes all major countries with complete metadata
|
|
340
|
+
*/
|
|
341
|
+
declare const COUNTRIES: Country[];
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Currency information by currency code
|
|
345
|
+
*/
|
|
346
|
+
declare const CURRENCIES: Record<string, CurrencyInfo>;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Phone format data by country
|
|
350
|
+
* Includes dial codes, number lengths, and prefixes
|
|
351
|
+
*/
|
|
352
|
+
declare const PHONE_FORMATS: Record<string, PhoneFormat>;
|
|
353
|
+
/**
|
|
354
|
+
* Get phone format for a country
|
|
355
|
+
*/
|
|
356
|
+
declare function getPhoneFormat(countryCode: string): PhoneFormat | null;
|
|
357
|
+
/**
|
|
358
|
+
* Get all supported country codes
|
|
359
|
+
*/
|
|
360
|
+
declare function getSupportedPhoneCountries(): string[];
|
|
361
|
+
|
|
362
|
+
export { getCountryFromEmoji as A, isFlagEmoji as B, type Country as C, getAllFlags as D, getDialingCode as E, getCountriesByDialingCode as F, formatWithDialingCode as G, hasValidDialingCode as H, COUNTRIES as I, CURRENCIES as J, PHONE_FORMATS as K, getPhoneFormat as L, getSupportedPhoneCountries as M, type PhoneFormat as P, type TimezoneInfo as T, type CurrencyInfo as a, type CountryCodeFormat as b, getCountryByAlpha3 as c, getCountryByNumeric as d, getCountry as e, convertCountryCode as f, getCountryByAlpha2 as g, getAllCountries as h, getCountriesByContinent as i, getCountriesByLanguage as j, isValidCountryCode as k, getTimezonesByCountry as l, getDefaultTimezone as m, getCurrentTimeInCountry as n, getTimezoneOffset as o, convertTimeBetweenCountries as p, formatTimeForCountry as q, getCurrency as r, searchCountries as s, getCurrencyByCountry as t, formatCurrency as u, parseCurrency as v, getAllCurrencies as w, getCurrencySymbol as x, convertCurrency as y, getFlagEmoji as z };
|