@types/geoip-country
TypeScript icon, indicating that this package has built-in type declarations

4.0.2 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/geoip-country

Weekly Downloads

50,045

Version

4.0.2

License

MIT

Unpacked Size

3.81 kB

Total Files

5

Last publish

Collaborators

  • types