country-codes-list
Advanced tools
Comparing version 1.6.10 to 1.6.11
@@ -5,3 +5,3 @@ // Types for https://www.npmjs.com/package/country-codes-list | ||
declare module 'country-codes-list' { | ||
enum CountryProperty { | ||
export enum CountryProperty { | ||
countryNameEn = 'countryNameEn', | ||
@@ -23,35 +23,41 @@ countryNameLocal = 'countryNameLocal', | ||
type CountryData = { | ||
[CountryProperty.countryNameEn]: string, | ||
[CountryProperty.countryNameLocal]: string, | ||
[CountryProperty.countryCode]: string, | ||
[CountryProperty.currencyCode]: string, | ||
[CountryProperty.currencyNameEn]: string, | ||
[CountryProperty.tinType]: string, | ||
[CountryProperty.tinName]: string, | ||
[CountryProperty.officialLanguageCode]: string, | ||
[CountryProperty.officialLanguageNameEn]: string, | ||
[CountryProperty.officialLanguageNameLocal]: string, | ||
[CountryProperty.countryCallingCode]: string, | ||
[CountryProperty.region]: string, | ||
[CountryProperty.flag]: string, | ||
}; | ||
[CountryProperty.countryNameEn]: string | ||
[CountryProperty.countryNameLocal]: string | ||
[CountryProperty.countryCode]: string | ||
[CountryProperty.currencyCode]: string | ||
[CountryProperty.currencyNameEn]: string | ||
[CountryProperty.tinType]: string | ||
[CountryProperty.tinName]: string | ||
[CountryProperty.officialLanguageCode]: string | ||
[CountryProperty.officialLanguageNameEn]: string | ||
[CountryProperty.officialLanguageNameLocal]: string | ||
[CountryProperty.countryCallingCode]: string | ||
[CountryProperty.region]: string | ||
[CountryProperty.flag]: string | ||
} | ||
type Filter<T> = (element: T, index: number, array: T[]) => T[]; | ||
type Filter<T> = (element: T, index: number, array: T[]) => T[] | ||
type CustomArraySettings = { | ||
sortDataBy?: CountryProperty, | ||
sortBy?: any, | ||
filter?: Filter<CountryData>, | ||
}; | ||
sortDataBy?: CountryProperty | ||
sortBy?: any | ||
filter?: Filter<CountryData> | ||
} | ||
export function all(): CountryData[]; | ||
export function all(): CountryData[] | ||
export function filter(countryProperty: CountryProperty, value: string): CountryData[]; | ||
export function filter( | ||
countryProperty: CountryProperty, | ||
value: string, | ||
): CountryData[] | ||
export function findOne(countryProperty: CountryProperty, value: string): CountryData; | ||
export function findOne( | ||
countryProperty: CountryProperty, | ||
value: string, | ||
): CountryData | ||
export function customArray( | ||
fields?: { name?: string, value?: string }, | ||
settings?: CustomArraySettings | ||
): string[]; | ||
fields?: Record<string, string>, | ||
settings?: CustomArraySettings, | ||
): Record<string, string>[] | ||
@@ -62,3 +68,3 @@ export function customList( | ||
settings?: CustomArraySettings, | ||
): { [CountryProperty]: string }; | ||
): { [key in CountryProperty]: string } | ||
} |
{ | ||
"name": "country-codes-list", | ||
"version": "1.6.10", | ||
"version": "1.6.11", | ||
"description": "List of codes per country (languages, calling codes, currency codes, etc)", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\"" | ||
}, | ||
@@ -11,0 +11,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
128324
4223