Skip to main content
interface PostalCodeOptions
import { type PostalCodeOptions } from "https://deno.land/x/postal_code@v0.1.0/types.ts";

PostalCodeOptions

An object to describe which addresses data should be used. The default configuration is:

{
  country: "th",
  resourceUrl: "https://raw.githubusercontent.com/santa-soft/postal-code/main/.local/th/postal_codes.json",
  cachePath: "./.local/th/postal_codes.json",
  lang: "en"
}

Properties

optional
country: string

Configure address of which country

*** Only support Thailand for now.

optional
resourceUrl: string

Configure url of json data file which contains addresses and zip code.

optional
cachePath: string

Configure local path when load json data of addresses from resourceUrl.

optional
lang: string

Configure of output data when you query with .addressOf() function.