Skip to content

Commit

Permalink
feat: subdivisions and findCountrySubdivisions added
Browse files Browse the repository at this point in the history
  • Loading branch information
muratgozel committed Aug 18, 2024
1 parent ff81bad commit 4a41478
Show file tree
Hide file tree
Showing 16 changed files with 31,758 additions and 65 deletions.
54 changes: 28 additions & 26 deletions dist/index.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.cjs.map

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion dist/index.d.cts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ interface Timezone {
country: string;
}

interface Subdivision {
countryCode: string;
code: string;
nativeName?: string;
englishName: string;
}

declare const countryCodes: string[];
declare const countries: Country[];
declare const countryCallingCodes: {
Expand Down Expand Up @@ -819,6 +826,17 @@ declare const countriesByTerritory: {
"034": string[];
QO: string[];
};
declare const subdivisions: ({
code: string;
countryCode: string;
englishName: string;
nativeName: string;
} | {
code: string;
countryCode: string;
englishName: string;
nativeName?: never;
})[];
declare const findTerritories: () => {
code: string;
name: string;
Expand All @@ -839,5 +857,6 @@ declare const findLanguage: (v: string) => Language | undefined;
declare const findCountryTimezones: (v: string) => Timezone[] | undefined;
declare const findCountryFromTimezoneName: (n: string) => string | undefined;
declare const findTimezoneOffset: (v: string) => number | undefined;
declare const findCountrySubdivisions: (v: string) => Subdivision[];

export { countries, countriesByTerritory, countryCallingCodes, countryCodes, countryCurrencies, countryLanguages, currencies, currencyCodes, findCountry, findCountryCallingCode, findCountryCurrencyCode, findCountryFromTimezoneName, findCountryLanguages, findCountryTerritory, findCountryTimezones, findCurrency, findLanguage, findTerritories, findTimezoneOffset, isCountryCode, isCurrencyCode, isLanguageCode, languageCodes, languages, territories, timezones };
export { countries, countriesByTerritory, countryCallingCodes, countryCodes, countryCurrencies, countryLanguages, currencies, currencyCodes, findCountry, findCountryCallingCode, findCountryCurrencyCode, findCountryFromTimezoneName, findCountryLanguages, findCountrySubdivisions, findCountryTerritory, findCountryTimezones, findCurrency, findLanguage, findTerritories, findTimezoneOffset, isCountryCode, isCurrencyCode, isLanguageCode, languageCodes, languages, subdivisions, territories, timezones };
21 changes: 20 additions & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ interface Timezone {
country: string;
}

interface Subdivision {
countryCode: string;
code: string;
nativeName?: string;
englishName: string;
}

declare const countryCodes: string[];
declare const countries: Country[];
declare const countryCallingCodes: {
Expand Down Expand Up @@ -819,6 +826,17 @@ declare const countriesByTerritory: {
"034": string[];
QO: string[];
};
declare const subdivisions: ({
code: string;
countryCode: string;
englishName: string;
nativeName: string;
} | {
code: string;
countryCode: string;
englishName: string;
nativeName?: never;
})[];
declare const findTerritories: () => {
code: string;
name: string;
Expand All @@ -839,5 +857,6 @@ declare const findLanguage: (v: string) => Language | undefined;
declare const findCountryTimezones: (v: string) => Timezone[] | undefined;
declare const findCountryFromTimezoneName: (n: string) => string | undefined;
declare const findTimezoneOffset: (v: string) => number | undefined;
declare const findCountrySubdivisions: (v: string) => Subdivision[];

export { countries, countriesByTerritory, countryCallingCodes, countryCodes, countryCurrencies, countryLanguages, currencies, currencyCodes, findCountry, findCountryCallingCode, findCountryCurrencyCode, findCountryFromTimezoneName, findCountryLanguages, findCountryTerritory, findCountryTimezones, findCurrency, findLanguage, findTerritories, findTimezoneOffset, isCountryCode, isCurrencyCode, isLanguageCode, languageCodes, languages, territories, timezones };
export { countries, countriesByTerritory, countryCallingCodes, countryCodes, countryCurrencies, countryLanguages, currencies, currencyCodes, findCountry, findCountryCallingCode, findCountryCurrencyCode, findCountryFromTimezoneName, findCountryLanguages, findCountrySubdivisions, findCountryTerritory, findCountryTimezones, findCurrency, findLanguage, findTerritories, findTimezoneOffset, isCountryCode, isCurrencyCode, isLanguageCode, languageCodes, languages, subdivisions, territories, timezones };
54 changes: 28 additions & 26 deletions dist/index.global.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.global.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "locale-util",
"version": "4.2.1",
"version": "4.3.0",
"description": "Locale data generators written in node.js. Uses reliable sources. Generated data available as JS/JSON objects.",
"type": "module",
"exports": {
Expand All @@ -23,6 +23,7 @@
"phonenumber_metadata_endpoint": "https://raw.githubusercontent.com/googlei18n/libphonenumber/master/resources/PhoneNumberMetadata.xml",
"cldr_supplement_filepath": "./cldr-data-common/supplemental/supplementalData.xml",
"cldr_main_path": "./cldr-data-common/main",
"cldr_subdivisions_path": "./cldr-data-common/subdivisions",
"data_path": "./src/data"
},
"engines": {
Expand Down
Loading

0 comments on commit 4a41478

Please sign in to comment.