Socket
Socket
Sign inDemoInstall

sg-zipcode-to-address-ts

Package Overview
Dependencies
47
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

sg-zipcode-to-address-ts

This command-line tool allows you to convert zip codes to addresses and vice versa using the OneMap API.


Version published
Maintainers
1
0

Weekly downloads

Readme

Source

Zip Code and Address Converter

This command-line tool allows you to convert zip codes to addresses and vice versa using the OneMap API.

Prerequisites

  • Node.js

Installation

  1. Clone this repository or download the code.
  2. Navigate to the project directory in your terminal.
  3. Install the required dependencies:
npm install axios dotenv commander fs

4.Install TypeScript and ts-node globally:

npm install -g typescript ts-node

5.Create a .env file in the project directory and add your OneMap API key:

ONEMAP_API_KEY=your_api_key_here

Usage

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

ts-node index.ts --zipcode <zipcode>

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

ts-node index.ts --address "<address>"

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

ts-node index.ts --zipcode <zipcode> --file

Example

ts-node index.ts --zipcode 123456
ts-node index.ts --address "10 Downing St, Westminster, London"

Keywords

FAQs

Last updated on 06 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc