country-state-lga
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

country-state-lga

country-state-lga is a utility library that provides information about countries, including their capitals, states, lgas, country codes, and dial codes. It is designed to be used in JavaScript and TypeScript applications.

Installation

You can install country-state-lga using npm or yarn. Make sure you have Node.js installed on your machine.

npm install country-state-lga

or

npm install country-state-lga

Usage

Here's an example of how you can use country-state-lga in your JavaScript or TypeScript code:

import { COUNTRY_CODES, getCountryByCode, searchCountryByName } from 'country-state-lga';

const country = getCountryByCode('NGA');
console.log(country);
// Output: { name: 'Nigeria', capital: 'Abuja', code: 'NGN' }

const countryByName = searchCountryByName('Canada');
console.log(countryByName);
// Output: { name: 'Canada', capital: 'Ottawa', code: 'CA' }

Contributing

Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue on the GitHub repository.

License

This project is licensed under the MIT License.

Package Sidebar

Install

npm i country-state-lga

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

218 kB

Total Files

35

Last publish

Collaborators

  • amnabdulmalik