nigeria-states-lga-select
v1.0.9
Published
A package to get Nigerian states and their Local Government Areas (LGAs)
Downloads
12
Maintainers
Readme
nigeria-states-lga-select
nigeria-states-lga-select
is a simple JavaScript library for retrieving Nigerian states and their respective Local Government Areas (LGAs).
Installation
You can install the package via npm:
npm install nigeria-states-lga-select
Usage
Import the library in your project and use the getStates and getLgas functions to retrieve states and LGAs.
Example
const { getStates, getLgas } = require('nigeria-states-lga-select');
// Get list of all Nigerian states
const states = getStates();
console.log(states);
// Get list of LGAs for a specific state
const abiaLgas = getLgas('Abia');
console.log(abiaLgas);
Function
getStates(): Returns an array of all Nigerian states.
getLgas(state): Returns an array of LGAs for the given state. If the state is not found, it returns an empty array.
Uninstallation
npm uninstall nigeria-states-lga-select
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Anibe Samuel