1.0.2 • Published 3 years ago

onemap-address-search-singapore v1.0.2

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years ago

onemap-address-search-singapore

Helper library to get Singapore address by postal code using OneMap API (https://docs.onemap.sg/)

Installation

# using npm
npm install onemap-address-search-singapore

# using yarn
yarn add onemap-address-search-singapore

Usage

# using require
const { getAddress } = require('onemap-address-search-singapore');

# using import
import { getAddress } from 'onemap-address-search-singapore';

Example

Using promises:

getAddress({
  postalCode: '178897' // provide Singapore postal code
}).then((address) => console.log(address));

Using async/await:

const getAddress = async function () {
  const address = await getAddress({
    postalCode: '178897' // provide Singapore postal code
  });
  console.log(address);
};

getAddress();
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago