nigeria-states-lga-select
is a simple JavaScript library for retrieving Nigerian states and their respective Local Government Areas (LGAs).
You can install the package via npm:
npm install nigeria-states-lga-select
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);
-
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.
npm uninstall nigeria-states-lga-select
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Anibe Samuel