File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,31 @@ export interface Lookup {
33 range : [ number , number ] ;
44 /** 2 letter ISO-3166-1 country code https://www.iban.com/country-codes */
55 country : string ;
6+ /** Full country name */
7+ name ?: string ;
8+ /** Native country name */
9+ native ?: string ;
10+ /** Full capital name */
11+ capital ?: string ;
12+ continent ?: "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA" ;
13+ continent_name ?: "Africa" | "Antarctica" | "Asia" | "Europe" | "North America" | "Oceania" | "South America" ;
14+ /** ISO 639-1 2 letter language codes */
15+ languages ?: string [ ] ;
16+ /** ISO 4217 currency codes */
17+ currency ?: string [ ] ;
18+ /** Phone number prefixes */
19+ phone ?: string [ ] ;
620}
721
822export type CmpArgs = number | [ number ] ;
923export type CmpResult = 1 | - 1 | 0 | null ;
1024
1125export function cmp ( a : CmpArgs , b : CmpArgs ) : null | Lookup ;
26+ /**
27+ * @param ip ipv4, ipv6 or "dual stack" IP (e.g. `"::ffff:8.8.8.8"`)
28+ *
29+ * @returns null for local IPs and unknown IP ranges, otherwise an object with country info
30+ */
1231export function lookup ( ip : string | number ) : null | Lookup ;
1332export function pretty ( ip : string | number | Array < string | number > ) : string ;
1433export function startWatchingDataUpdate ( cb ?: ( err ?: Error ) => void ) : void ;
Original file line number Diff line number Diff line change 11{
22 "private" : true ,
33 "name" : " @types/geoip-country" ,
4- "version" : " 4 .0.9999" ,
4+ "version" : " 5 .0.9999" ,
55 "projects" : [
66 " https://github.com/sapics/geoip-country"
77 ],
You can’t perform that action at this time.
0 commit comments