### Install Country Codes Package Source: https://github.com/apollo-tech-dev/country-codes/blob/main/README.md Installs the @apollo-tech/country-codes package using npm. ```bash npm install @apollo-tech/country-codes ``` -------------------------------- ### Usage Example Source: https://github.com/apollo-tech-dev/country-codes/blob/main/README.md Demonstrates how to import and use the CountryCodes class to search for country information using FIPS, ISO, internet codes, and country name. ```typescript import CountryCodes from '@apollo-tech/country-codes'; const countryCodes = new CountryCodes(); // Search for a country by FIPS code const countryByFips = countryCodes.byFips('US'); console.log(countryByFips); // Search for a country by ISO code const countryByIso = countryCodes.byIso('USA'); console.log(countryByIso); // Search for a country by internet code const countryByInternet = countryCodes.byInternet('US'); console.log(countryByInternet); // Search for a country by name const countryByName = countryCodes.byCountry('United States'); console.log(countryByName); ``` -------------------------------- ### Country Codes API Documentation Source: https://github.com/apollo-tech-dev/country-codes/blob/main/README.md Provides documentation for the methods available in the CountryCodes class, including their parameters, return types, and specific usage notes. ```APIDOC CountryCodes: __init__() Initializes the CountryCodes class. byFips(code: string): CountryResponse Searches for a country by its FIPS code. Parameters: code: The FIPS code to search for. Returns: A CountryResponse object or null. byIso(code: string | number, safeMode: boolean = false): CountryResponse Searches for a country by its ISO code (ISO2, ISO3, or ISO numeric). Parameters: code: The ISO code to search for. safeMode: If true, returns null for invalid codes instead of throwing an error. Returns: A CountryResponse object or null. byInternet(code: string): CountryResponse Searches for a country by its internet code. Parameters: code: The internet code to search for. Returns: A CountryResponse object or null. byCountry(country: string, ignoreCase: boolean = false): CountryResponse Searches for a country by its name. Parameters: country: The country name to search for. ignoreCase: If true, performs a case-insensitive search. Returns: A CountryResponse object or null. ``` -------------------------------- ### Country Response Interface Source: https://github.com/apollo-tech-dev/country-codes/blob/main/README.md Defines the structure of the CountryResponse object returned by the package's methods, detailing the properties of a Country object. ```typescript interface Country { continent: string; region: string; country: string; capital: string; fips: string; iso2: string; iso3: string; isoNo: number; internet: string; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.