Installation
npm install --save @types/geoip-country
Summary
This package contains type definitions for geoip-country (https://github.com/sapics/geoip-country).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/geoip-country.
index.d.ts
export interface Lookup {
/** [ <low bound of IP block>, <high bound of IP block> ] */
range: [number, number];
/** 2 letter ISO-3166-1 country code https://www.iban.com/country-codes */
country: string;
}
export type CmpArgs = number | [number];
export type CmpResult = 1 | -1 | 0 | null;
export function cmp(a: CmpArgs, b: CmpArgs): null | Lookup;
export function lookup(ip: string | number): null | Lookup;
export function pretty(ip: string | number | Array<string | number>): string;
export function startWatchingDataUpdate(cb?: (err?: Error) => void): void;
export function stopWatchingDataUpdate(): void;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by Jesse Chan.