1.0.0 • Published 11 months ago

geothai v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

GeoThai NPM Packages

NPM Version License

Welcome to the GeoThai NPM Packages repository! 🌟 This repository provides an npm package for Node.js that allows you to retrieve detailed geographic data of provinces, districts, subdistricts, and postal code in Thailand.

📦 Overview

This package includes functions to access and retrieve data about:

  • Provinces
  • Districts
  • Subdistricts
  • Postal Code

The data is sourced from comprehensive JSON files included in the package.

📊 Features

  • Retrieve All Provinces: Fetch a list of all provinces in Thailand.
  • Retrieve Province by ID: Get details of a specific province using its ID.
  • Retrieve All Districts: Fetch a list of all districts.
  • Retrieve District by ID: Get details of a specific district using its ID.
  • Retrieve All Subdistricts: Fetch a list of all subdistricts.
  • Retrieve Subdistrict by ID: Get details of a specific subdistrict using its ID.
  • Retrieve All Postal Codes: Fetch a list of all postal codes.
  • Retrieve Postal Code by Code: Get details of a specific postal code using its code.
  • Filter by Criterion: Retrieve entities based on specific criteria.

🚀 Installation

You can install the package via npm:

npm install geothai

🛠️ Usage

Here’s a quick guide on how to use the package:

import { getAllProvinces, getProvinceById, getProvincesByCriterion } from 'geothai'

// Retrieve all provinces
const provinces = getAllProvinces()
console.log(provinces)

// Retrieve a single province by ID
const province = getProvinceById(10)
console.log(province)

// Retrieve provinces by a specific criterion
const filteredProvinces = getProvincesByCriterion({ province_name_th: 'กรุงเทพมหานคร' })
console.log(filteredProvinces)

🤝 Contributing

We welcome contributions to enhance this package. Please follow the guidelines in the CONTRIBUTING.md file.

📝 License

This project is licensed under the MIT License. See the LICENSE file for details.

🙋‍♂️ Contact

For any questions or support, please open an issue or contact us at pyyupsk@proton.me.

Happy coding! 🎉

1.0.0

11 months ago

0.2.0

11 months ago

0.1.0

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago