Skip to main content
Deno 2 is finally here 🎉ïļ
Learn more

Postal Code API

Postal Code is Deno module for providing mapped postal zip code with addresses

Usage

Simple Usage

import { createPostalCode } from "https://deno.land/x/postal_code/mod.ts";

const postalCode = await createPostalCode("TH", { lang: "th" });
const bangkok01 = postalCode.addressOf(10270);

// example `bangkok01` structure
  {
    "code": 10270,
    "province": "āļŠāļĄāļļāļ—āļĢāļ›āļĢāļēāļāļēāļĢ",
    "district": "āđ€āļĄāļ·āļ­āļ‡āļŠāļĄāļļāļ—āļĢāļ›āļĢāļēāļāļēāļĢ",
    "subDistrict": "āļ›āļēāļāļ™āđ‰āļģ"
    "region": "āļ āļēāļ„āļāļĨāļēāļ‡"
  },
  {
    "code": 10270,
    "province": "āļŠāļĄāļļāļ—āļĢāļ›āļĢāļēāļāļēāļĢ",
    "district": "āđ€āļĄāļ·āļ­āļ‡āļŠāļĄāļļāļ—āļĢāļ›āļĢāļēāļāļēāļĢ",
    "subDistrict": "āļŠāļģāđ‚āļĢāļ‡āđ€āļŦāļ™āļ·āļ­",
    "region": "āļ āļēāļ„āļāļĨāļēāļ‡"
  },
  {
    "code": 10270,
    "province": "āļŠāļĄāļļāļ—āļĢāļ›āļĢāļēāļāļēāļĢ",
    "district": "āđ€āļĄāļ·āļ­āļ‡āļŠāļĄāļļāļ—āļĢāļ›āļĢāļēāļāļēāļĢ",
    "subDistrict": "āļšāļēāļ‡āđ€āļĄāļ·āļ­āļ‡",
    "region": "āļ āļēāļ„āļāļĨāļēāļ‡"
  },

License

Open Software License (“OSL”)