UNPKG

countries-capitals

Version:

A simple package to get the capital of the countries

27 lines (26 loc) 761 B
export interface CountryItem { country: string; city: string | null; independence: string | null; location: string | null; } export interface CountryItems extends Array<CountryItem> { } export declare type FilterInput = string | null; export default class Countries { private countries; private original; constructor(countries?: CountryItems); list(): CountryItems; reset(): this; private containString; byName(name: string): this; byCapital(capital: FilterInput): this; byLocation(region: FilterInput): this; locations(): string[]; byIndependence(year: number | null, operator?: string): this; longest(): this; private compare; toJson(): CountryItems; get capital(): string | null; }