The `thai-address-custom-database` package offers a client-side database for Thai addresses, removing the need for server-side lookups. It builds upon the `Sellsuki/thai-address-database` project and specifically incorporates the database and `preprocess()` function from `jquery.Thailand.js` version 1.5.1 (commit 4e5f496). The current stable version is 1.0.2. This library is updated infrequently, primarily providing database maintenance and minor library updates. A key differentiator is its ability to generate the client-side `db.json` from an `xlsx` spreadsheet via a migration script. However, it currently only supports the `db.json` format and does not include support for `db.zip` or `geodb` variants found in some related projects. It requires Node.js version 12 or higher.
npm install thai-address-custom-databaseVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use the `searchAddressByDistrict` function to query Thai address data.
Always use `import ... from 'thai-address-custom-database'` when importing this package.
Ensure your database operations and expectations align with the `db.json` format. If other formats are required, consider alternative libraries.
Verify that your updated address data is saved as `database.xlsx` (specifically the Excel Workbook format) before running `npm run migrate`.
Be aware of potential data freshness or compatibility issues with newer versions of upstream data sources. Monitor the `thai-address-custom-database` repository for updates if upstream changes occur.
Change your import statement from `import { ... } from 'thai-address-database'` to `import { ... } from 'thai-address-custom-database'`.Ensure you are using ES Module `import { searchAddressByDistrict } from 'thai-address-custom-database';` in an environment configured for ESM. Verify the export name is correct.Confirm that the address data spreadsheet is correctly named `database.xlsx` and saved with the .xlsx extension (not .xls) before executing `npm run migrate`.
No dependency data recorded yet.