@celo/utils"packages/sdk/utils/src/countries"Countries

Class: Countries

deprecated moved to @celo/phone-utils will be removed in next major version

Hierarchy

  • Countries

Index

Constructors

Properties

Methods

Constructors

constructor

+ new Countries(language?: undefined | string): Countries

Defined in packages/sdk/utils/src/countries.ts:46

Parameters:

Name Type
language? undefined | string

Returns: Countries

Properties

countryMap

countryMap: Map‹string, LocalizedCountry

Defined in packages/sdk/utils/src/countries.ts:45


language

language: string

Defined in packages/sdk/utils/src/countries.ts:44


localizedCountries

localizedCountries: LocalizedCountry[]

Defined in packages/sdk/utils/src/countries.ts:46

Methods

getCountry

getCountry(countryName?: string | null): LocalizedCountry | undefined

Defined in packages/sdk/utils/src/countries.ts:56

Parameters:

Name Type
countryName? string | null

Returns: LocalizedCountry | undefined


getCountryByCodeAlpha2

getCountryByCodeAlpha2(countryCode: string): LocalizedCountry | undefined

Defined in packages/sdk/utils/src/countries.ts:66

Parameters:

Name Type
countryCode string

Returns: LocalizedCountry | undefined


getFilteredCountries

getFilteredCountries(query: string): LocalizedCountry[]

Defined in packages/sdk/utils/src/countries.ts:70

Parameters:

Name Type
query string

Returns: LocalizedCountry[]