Skip to content

minmyatoo/sg-zipcode-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

79 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ™οΈ Zip Code and Address Converter

Convert zip codes to addresses and back with ease using this command-line tool, fueled by the OneMap API. πŸš€

Prerequisites πŸ› οΈ

  • Node.js (Version 18 or higher recommended)

Installation πŸ“¦

  1. Clone this repository or download the code.
  2. Navigate to the project directory in your terminal.
  3. Install the necessary dependencies:
npm install

Usage πŸ“

To convert a zip code to an address, use this command:

npx ts-node src/index.ts --zipcode <zipcode>

Or use the npm script:

npm run zipcode -- <zipcode>

To convert an address to a zip code, run this command:

npx ts-node src/index.ts --address "<address>"

To save addresses for a zip code to a file, add the --file flag:

npx ts-node src/index.ts --zipcode <zipcode> --file

Example 🌟

npm run zipcode -- 123456
npx ts-node src/index.ts --address "Plaza Singapura"

About

Experience the magic of this Node.js CLI tool! It effortlessly transforms Singapore zip codes into addresses and vice versa. πŸ‡ΈπŸ‡¬βœ¨ Powered by the OneMap API, it even lets you save these converted addresses to a handy JSON file. Simply provide the zip code or address, specify your output format, and let the tool work its charm. πŸš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors