geothai
TypeScript icon, indicating that this package has built-in type declarations

1.0.0ย โ€ขย Publicย โ€ขย Published

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! ๐ŸŽ‰

/geothai/

    Package Sidebar

    Install

    npm i geothai

    Weekly Downloads

    51

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.6 MB

    Total Files

    13

    Last publish

    Collaborators

    • pyyupsk