county
Version:
A JavaScript library for working with state-wise county names in the United States.
48 lines (32 loc) • 1.01 kB
Markdown
County is a simple JavaScript library that provides functionality for working with state-wise county names in the United States.
You can install the County Library via npm:
```bash
npm install county
```
```javascript
const countyLibrary = require("county");
```
```javascript
const states = countyLibrary.getAllStates();
console.log(states);
// Output: ["Alabama", "Alaska", /* Other states */]
```
```javascript
const counties = countyLibrary.getCountiesByState("Alabama");
console.log(counties);
// Output: ["Autauga", "Baldwin", "Barbour", /* Other counties in Alabama */]
```
```javascript
const matchingCounties = countyLibrary.searchCounties("lake");
console.log(matchingCounties);
// Output: ["Lake", "Lake and Peninsula", /* Other matching counties */]
```
- This project is licensed under the MIT License - see the LICENSE file for details.